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

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
Highlighted

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
Highlighted
Dual Super User III
Dual Super User III

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

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

Highlighted
Dual Super User III
Dual Super User III

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

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

Highlighted
Dual Super User III
Dual Super User III

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

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

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

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (11,794)