Hey guys,
In my app at the OnStart I've set a ClearCollect function and at OnVisible of the "Home" page there's a formula to set the visibility of a gallery based on a filtered countrows.
OnStart: ClearCollect(bookinglist,'DB-Booking')
OnVisible-Home: If(CountRows(Filter(bookinglist,Mail=Label6.Text,Day=Label6_1.text))=0,UpdateContext({visible:false}),UpdateContext({visible:true})
Home formulas
Visible-Gallery: visible
Label6= Text(Today(),"dd/mm/yyyy")
Label6_1=User().Email
When I start the app the gallery doens't load but when i move to another page then come back it appers.
Any tips?
Many thanks
Your formula for OnVisible home is missing a ")" at the end for the If() function.
If(
IsEmplty(
Filter(
bookinglist, Mail=Label6.Text, Day=Label6_1.text
)
), UpdateContext({visible:false}), UpdateContext({visible:true})
)
Hi @Drrickryp ,
thank you for your answer, I've changed the formula according to your suggestions but it still doesn't work when the page loads but only when I come back to the home page after navigating to another one
Hi @Sesese ,
You have a refreshing /calculation order issue there - forget about the labels and do this (also visible is not a good name for a Variable)
UpdateContext(
{
visible:
CountRows(
Filter(
bookinglist,
Mail = User().Email &&
Day = Text(Today(),"dd/mm/yyyy")
)
) > 0
}
)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Visit my blog Practical Power Apps
User | Count |
---|---|
257 | |
110 | |
97 | |
52 | |
39 |