cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper II
Helper II

Show all gallery items until filters are applied

I have a gallery that is correctly filtering when I have 1 or multiple things selected (things = 2 combo boxes and 1 text search box).  However, I would like to have the gallery display everything when nothing is selected in the combo boxes and the text box.  Basically, start with the full list of items in the gallery, and whittle it down as items/values are selected in the combo boxes and text box.   The below formula starts with all blanks and brings in the appropriate values as combo box and text inputs are selected.  

 

 

Gallery Items Property:

 

Filter('Standards, Disclaimers & Disclosures', 'Review Element(s)' in ComboBox1.SelectedItems.Result || 'Subject Matter ' in ComboBox2.SelectedItems.Result || TextInput1.Text in 'Required Language')

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User III
Super User III

If(IsBlank(TextInput1) &&IsEmpty(ComboBox1.SelectedItems)&&IsEmpty(ComboBox2.SelectedItems),

Standards,

Filter('Standards, Disclaimers & Disclosures', 'Review Element(s)' in ComboBox1.SelectedItems.Result || 'Subject Matter ' in ComboBox2.SelectedItems.Result || TextInput1.Text in 'Required Language'))

 

I assume you Datasource is standards

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

View solution in original post

4 REPLIES 4
Super User III
Super User III

If(IsBlank(TextInput1) &&IsEmpty(ComboBox1.SelectedItems)&&IsEmpty(ComboBox2.SelectedItems),

Standards,

Filter('Standards, Disclaimers & Disclosures', 'Review Element(s)' in ComboBox1.SelectedItems.Result || 'Subject Matter ' in ComboBox2.SelectedItems.Result || TextInput1.Text in 'Required Language'))

 

I assume you Datasource is standards

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

View solution in original post

Edited: Thanks for the help, regrettably the same issue remains.  But, I think it is related to a button I embedded:

 

OnSelect: Reset(ComboBox1);Reset(ComboBox2);Reset(TextInput1)

 

If I manually remove the selections in the comboboxes the gallery resets normal..so I think the button is the issue.  How do I clear the comboboxes and textbox with a click of a button?

 

You are correct, Standards, Disclaimers & Disclosures is my Datasource.

Please I used only standard as the Datasource, did you correct to 

'Standards, Disclaimers & Disclosures' 

 

The formula should not be inside the Gallery but on the ITEMS property of the Gallery.

 

Can you show a screenshot

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

 

 

you beat me to the punch on responding.  I tinkered with it and found the issue resides on my 'clear' button.  The formula you provided does in fact work.  When I manually remove the selections in the comboboxes or text box the gallery does reset to all items. 

 

My button property is:

 

OnSelect: Reset(ComboBox1);Reset(ComboBox2);Reset(TextInput1)

 

I will need to rewrite that action.  Thanks for your help.  

 

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (51,293)