cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

Set filter settings OnSelect

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. 

 

Screenshot 2019-01-22 at 13.14.50.png

 

 

(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. 

 

Screenshot 2019-01-22 at 13.25.59.png

 

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, 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Hi @TheAudioPolice ,

 

You can set items property of ‘LijsyGallery’ to a variable .

 

I have made a test.

I create a sharepoint list named test5 .

20.PNG

 

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

Community Support Team _ Eason YU
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Frequent Visitor

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.... 

Community Support
Community Support

Hi @TheAudioPolice ,

 

You can set items property of ‘LijsyGallery’ to a variable .

 

I have made a test.

I create a sharepoint list named test5 .

20.PNG

 

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

Community Support Team _ Eason YU
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (5,149)