web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / ClearCollect method to...
Power Apps
Unanswered

ClearCollect method to populate gallery and allow search via Textbox; gallery doesn't refresh automatically

(0) ShareShare
ReportReport
Posted on by

There is a text box in my application and onSelect the following piece is executed : 

 

 

 

Refresh('ListName');
ClearCollect(GalleryData,
Filter('ListName', StartsWith(ColumnName.DisplayName, TextBoxName.Text)));

 

 

 

Now the gallery itself take data from GalleryData 

 

 

 

Filter(GalleryData, ColumName.Value = "SomeString")

 

 

 

The idea is to provide a gallery with searchbox feature which works on one of the columns, and a filter is there on top of it in the gallery which omits a few records based on value in one of the columns. 

 

Issue 1 : When the application loads - I would like it to be initialized with data which is already in the list including the filter which is in place.  I know it doesn't work like that because onSelect helps us to populate GalleryData, is there any alternative for this? 

 

Issue 2 : If on any other page there is some changes in share point list which feeds the data to gallery then those changes are not reflected automatically and I have to write something in textbox to make it work at times. This is more or less linked with previous issue itself, I am guessing if I sort out the initial load feature for gallery then this will be sorted as well. 

 

Thanks for your time. 

I have the same question (0)
  • Verified answer
    SeanHenderson Profile Picture
    1,104 on at
    Re: ClearCollect method to populate gallery and allow search via Textbox; gallery doesn't refresh automatically

    Hi @Anonymous 

     

    Issue 1 -  Just put your OnSelect formula into the application's OnStart property:

    Annotation 2020-01-31 104942.png

     

    Issue 2 - You can put the refresh into your app navigation arrows and buttons to keep it up to date.

     

    ---
    Please hit the "Accept as Solution" button if my post answered your question! If my post was helpful please consider giving it a "Thumbs Up."

  • Community Power Platform Member Profile Picture
    on at
    Re: ClearCollect method to populate gallery and allow search via Textbox; gallery doesn't refresh automatically

    Just one change from what you have suggested, at place of using APP on start, I did the same on respective screen's onVisible and it seems to work alright. 

    Thanks a lot for your help.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 836 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 231 Super User 2025 Season 2

Last 30 days Overall leaderboard