Solved! Go to Solution.
Happy New Year.
You may set:
- gallery.items = Filter(TableX, Date = Today()).
So, whatever data added today will be shown. On next day, it will be empty and show only next day's data.
Is that clear for you? I am sure it is simple for you but maybe I misunderstood you.
Haev a nice day.
I see what you are trying to do and it is a great idea to make your interface intuitive for your users.
The type that Default is looking for in the gallery object is an item. Specifically, an item that exists in the gallery's configured collection (items property). If you place anything in default that doesn't return something from its gallery you will get an error saying it is looking for an item, even if the function returns a valid item.
So, you have a couple of choices here, and I'll talk to the one I think will help you: LookUp(). LookUp is basically the "find" for collections(tables). The syntax is: LookUp(your_table_name, expression). In your case it would be something similar to this:
LookUp(roster_on_call, Date=Today()) where roster_on_call is your table name and Date is the name of the Date column.
****This assumes two things: 1. You have a Date column in your roster_on_call table and 2. The dates are formatted similar to what is returned by Today().
You may have to play around with the datevalue() function to get powerapps to compare correctly, but this is where you can start. Hope it helps!
Thanks so much for replying! My roster entries have an ID column that I'm using for the lookup, and the formula for obtaining this is already working. Using the Lookup() function per your suggestion is returning a valid response to the gallery, but the gallery still isn't jumping to my ID!
I've tried 2 methods to share my ID with the gallery. Both calculate the ID in Screen1's OnVisible property, and both show all records in the gallery, but neither will make the gallery jump to my ID.
Method 1. The gallery is on Screen1, the same screen it gets calculated on. The calculation stores the ID as a context variable. I thought this might not be working because the screen OnVisible code takes a while to figure out the ID.
Method 2. The gallery is on Screen2, a different screen than the one it gets calculated on. The calculation on Screen1 stores it as a collection record to compensate.
Any other ideas? Is it worth trying the other method to return the gallery item?
EDIT: I've now tried a third method - instead of finding the matching record, grabbing its ID and using it in the lookup, the Default property is set to the matching record directly. This doesn't work either. I'm beginning to wonder whether there is an issue with the control...
Hi all, the basic problem is that a gallery does not have a Reset property like a text input for example. When toggled to true, the Reset property resets text back to Default in the case of a text input.
However, we can still achieve what @lifelongjourney requires bearing in mind the following:
You can use this last point to achieve what you require.
Here is an example of the above at work:
Please let me know how you get on
Learn how to create your own user groups today!
Check out the new Power Platform Community Connections gallery!
Congratulations, the new Super User Season 2 for 2021 has started!
Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.