Problem with Datagrid with dynamic data from data master

shawn tng shared this problem 11 months ago
Solved

Usage:

1) Datamaster contains shopping records of many users.

2) Variable "current-user" is used to set the current userid

3) When onPageLoad or onVariableChange( referring to current-user), Data grid displays shopping records from data master based on user id. Value of data grid is calculated using filter function.

4) Everything works well when there is at least 1 record per userid. I can change the value of current-user variable to see different records.

5) However, problem is when there is a current-user that does not exist in the userid column, the data grid will show nothing. And after this, no matter what value the current-user, the datagrid will never show up anymore.

Best Answer
photo

You can create a Condition that will only filter the Data Grid if the Variable value is not empty, or if the Data Master contains the Variable's value. You can then create another event that displays the entire Data Master's contents in the Data Grid, or show an error message reflecting that the user id isn't present in the Data Master.

Comments (2)

photo
1

You can create a Condition that will only filter the Data Grid if the Variable value is not empty, or if the Data Master contains the Variable's value. You can then create another event that displays the entire Data Master's contents in the Data Grid, or show an error message reflecting that the user id isn't present in the Data Master.

photo
1

Thanks for the tips

photo