cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
TheAudioPolice
Level: Powered On

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 Team
Community Support Team

Re: Set filter settings OnSelect

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
TheAudioPolice
Level: Powered On

Re: Set filter settings OnSelect

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 Team
Community Support Team

Re: Set filter settings OnSelect

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
thirdimage

New Badges

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

Top Solution Authors
Top Kudoed Authors
Users online (6,962)