Filtering a Data Grid to display only specific records from the Data Master.

George Amend shared this question 6 years ago
Answered

How do you filter a Data Master list so that only items meeting a specific criteria are displayed in the Data Grid? For example, you have a list of reviews which prior users have entered over an extended period of time on many projects. The user selects the project from a Data Grid on which they wish to evaluate reviews. When they select the project a variable is established carrying the Project Index. The Reviews Data Master has a corresponding attribute identifying which project it refers too. How do you filter the Reviews Data Master displayed in the Data Grid so that only the corresponding projects are displayed?

Comments (3)

photo
1

Presuming you have the the Review in a variable, then you just need to create set value event on a Projects data grid that, as value, sets this expression: filter((data master projects, project review attribute = (select(variable,review id))

photo
1

The goal was to maintain Reviews in a Data Master and to access the relevant ones via a key held in common with the Project Data Master. When the user selects the project, the Project_Index is passed to a variable. When the reviews are controlled by the following condition when displayed in the Data Grid on the next page: ((Select (Row_1, Project_Index)has Selected_Project_Index)) where Project_Index is an attribute of Reviews and Selected_project_Index is a variable.


When simulated the Data Grid show all Reviews with only the matched Reviews populated with attribute data. (See image below)


053e02855c79eb237529ecd562df836c

photo
1

Instead of:


((Select (Row_1, Project_Index)has Selected_Project_Index))


Create this expression:


Filter(reviews data grid, (Project_Index has Selected_Project_Index))