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

Gallery not showing filtered data until control is updated

Hi all

 

I have a gallery items based on a filter from a drop down. The items do not show when I first navigate to the page where the gallery resides. But when I start using the drop down, it works as expected. What am I missing? Thank you in advance. 

1 ACCEPTED SOLUTION

Accepted Solutions
JomarGF
Level: Powered On

Re: Gallery not showing filtered data until control is updated

Solved. I have to make a hidden text box with the formula : Concat(ComboName.SelectedItems, Result)

and filter based on the value of the hidden text box as below:

 

Sort(
          If(
                IsBlank(txtTest.Text),
                collPropAssets,
                Filter(
                            collPropAssets,
                            TestingRoutineDesc in cmbCategory.SelectedItems
                         )
               ),
               AssetNo,
             If(
                 SortDescending1,
                 Descending,
                 Ascending
                )
      )

 

Please let me know of a better solution. 

View solution in original post

6 REPLIES 6
Dual Super User
Dual Super User

Re: Gallery not showing filtered data until control is updated

Would you post the Items property from the Gallery?  I suspect you are overfiltering the gallery until you pick an entry in the dropdown.  Its usually best to use an IF() statement for the Items property that adjusts if things like the dropdown are blank.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
JomarGF
Level: Powered On

Re: Gallery not showing filtered data until control is updated

Hi Thank you for your reply. I have this formula in the Gallery.Items

 

cmbCategory (Dropdown control, multi select enabled)

 

Sort(
         If(
              IsEmpty(cmbCategory.SelectedItems.Result),
              collPropAssets,
              Filter(
                        collPropAssets,
                        TestingRoutineDesc in cmbCategory.SelectedItems
                      )
             ),
                AssetNo,
          If(
               SortDescending1,
               Descending,
               Ascending
            )
      )

Dual Super User
Dual Super User

Re: Gallery not showing filtered data until control is updated

I would double check on whether your selected items are actually throwing a True for IsEmpty when you enter the screen. It may be registering as Null at that point.  Otherwise the code looks right.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
JomarGF
Level: Powered On

Re: Gallery not showing filtered data until control is updated

Can you give a suggestion on how can I check for that? Thanks!

Dual Super User
Dual Super User

Re: Gallery not showing filtered data until control is updated

What is the combox bound to for items?  I tried it with a local collection and can't replicate your issue.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
JomarGF
Level: Powered On

Re: Gallery not showing filtered data until control is updated

Solved. I have to make a hidden text box with the formula : Concat(ComboName.SelectedItems, Result)

and filter based on the value of the hidden text box as below:

 

Sort(
          If(
                IsBlank(txtTest.Text),
                collPropAssets,
                Filter(
                            collPropAssets,
                            TestingRoutineDesc in cmbCategory.SelectedItems
                         )
               ),
               AssetNo,
             If(
                 SortDescending1,
                 Descending,
                 Ascending
                )
      )

 

Please let me know of a better solution. 

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate 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

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,134)