Hi,
I'm working on a gallery screen that will be displaying filtered content based on criteria that will be selected by Icon.Onselect, and displaying the selection name through a variable. ( i.e.: Set(CurrentVariable,"Donateurs"))
When I click on one of the filter icons, OnSelect should
- (a) sets the Currentvariable name
- (b) Filters the LijstGallery on LijstScherm1 screen based on specific criteria (.i.e.
SortByColumns(Filter(LedenColl,Type.Value = "Donateur"),"Achternaam",Ascending)
- (c) Navigates to the LijstScherm1 screen.
(d) When I arrive on LijstScherm, the Gallery should show that filtered list, but I want to search in that specific list as well; using LijstFilter.text on "Lidno" or "Achternaam" if no selection given, it should return the filtered results again.
I can get (a) and (c) to work, as well as (d) on the target screen, but what is a good approach to set the gallery.items filtering for (b) from the icons on the overview screen, given that I have a lot of filtering criteria?
I've seen https://powerusers.microsoft.com/t5/General-Discussion/Add-a-button-that-filters-gallery/td-p/137253, but that requires a toggle, and providing If-elseif-elseif statements for each option does not look very well to me.
Thanks in advance,
Solved! Go to Solution.
Hi @TheAudioPolice ,
You can set items property of ‘LijsyGallery’ to a variable .
I have made a test.
I create a sharepoint list named test5 .
Set Onselect property of the filter icon in screen1 to :
Set(CurrentVariable,"Donateurs");Set(var1,SortByColumns(Filter(test5,Type1=CurrentVariable),"Title",Ascending));Navigate(LijstScherm1,ScreenTransition.None)
Set Items property of the gallery in the LijstScherm1 to :
Var1
On your side , set Onselect property of the filter icon to :
Set(CurrentVariable,"Donateurs");Set(var1,SortByColumns(Filter(LedenColl,Type.Value=CurrentVariable),"Achternaam",Ascending));Navigate(LijstScherm1,ScreenTransition.None)
Set Items property of LijstGallery on LijstScherm1 screen to:
var1
Regards,
Eason
That was easier than thought:
Set(FilterList, SortByColumns(LedenColl,"Achternaam",Ascending));Set(CurrentVariable,"Actieve Leden");Navigate(Lijstscherm,ScreenTransition.Cover)
Where the Gallery.items should be the alias FilterList....
Hi @TheAudioPolice ,
You can set items property of ‘LijsyGallery’ to a variable .
I have made a test.
I create a sharepoint list named test5 .
Set Onselect property of the filter icon in screen1 to :
Set(CurrentVariable,"Donateurs");Set(var1,SortByColumns(Filter(test5,Type1=CurrentVariable),"Title",Ascending));Navigate(LijstScherm1,ScreenTransition.None)
Set Items property of the gallery in the LijstScherm1 to :
Var1
On your side , set Onselect property of the filter icon to :
Set(CurrentVariable,"Donateurs");Set(var1,SortByColumns(Filter(LedenColl,Type.Value=CurrentVariable),"Achternaam",Ascending));Navigate(LijstScherm1,ScreenTransition.None)
Set Items property of LijstGallery on LijstScherm1 screen to:
var1
Regards,
Eason
Stay up tp date on the latest blogs and activities in the community News & Announcements.
Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
User | Count |
---|---|
203 | |
187 | |
81 | |
50 | |
37 |
User | Count |
---|---|
299 | |
249 | |
124 | |
73 | |
55 |