Hi,
I am building a basic task management application where the Home screen (Dashboard Screen) has multiple buttons which on clicking takes the user to another screen (Landing Screen) having a Gallery to display the rows of data. Data is filtered on the basis of "Assigned To", "Created By"....etc.
Home Screen
The Variables have been declared in the OnVisible Property on the "Home Screen"
Set(asgto,Blank()); //AssignedTo
Set(asgby,Blank()); //AssignedBy
Set(ctdby,Blank()); //CreatedBy
The OnSelect property in the "Assigned To" button fetches the current login in user`s email and updates the variable in the "Home Screen".
Navigate(
'Landing Screen',
ScreenTransition.Cover,
{asgto: User().Email}
)
Landing Screen
The Items Property in the Gallery control on the "Landing Screen" displays the current logged in user`s "Assigned To" Task. I am using a filter as follows:-
Filter(
ATR,
'Created By'.Email = ctdby || IsBlank(ctdby),
'Assigned to'.Email = asgto || IsBlank(asgto),
'Assigned By'.Email = asgby || IsBlank(asgby)
)
The OnHidden property in the "Landing Screen" resets the variables to blank before the user gets back to the "Home Screen"
UpdateContext({asgby:Blank()});
UpdateContext({asgto:Blank()});
UpdateContext({ctdby:Blank()});
The problem is that the Gallery doesn`t seem to fetch the variables and remains blank. Although the variables have been passed on to the "Landing Screen" as I have checked by putting them on a label control. I can understand that somewhere I am getting the order of execution wrong. How do I fix it?
Thanks for any advice.
@v-xiaochen-msft - It`s very similar to a post that you have replied here.