Skip to main content

Notifications

Community site session details

Community site session details

Session Id : kMunCvTmpoQlvsZv8doDZ2
Power Apps - Building Power Apps
Unanswered

How do I refresh a collection ?

Like (1) ShareShare
ReportReport
Posted on 6 Jun 2018 15:26:56 by 1,292

Hi

 

Because of this outstanding bug -> https://powerusers.microsoft.com/t5/General-Discussion/Refresh-collection-on-gallery-and-keep-scrolling-position/td-p/62808 I have the need to refresh a collection which is connected to a GAllery after one of the entries in the Gallery has ben updated as the bug prevents the collection attached to the galery from refreshing, showing the updated entry.

 

THis is a classic parent / child relation ship where I update the child gallery item, using a Form set to edit mode, and then when I return to the Parent entity screen, having updated the collection using a SUBMIT commend,  (with the Child gallery embedd into it), the Chld gallery does not get updated. 

 

Thanks

 

Nigel

 

 

Categories:
  • joniSherman Profile Picture
    3 on 29 Jun 2021 at 16:06:49
    Re: How do I refresh a collection ?

    Hi jnberhkvbekhf

     

    How did you do that? I tried but Power App says that the second ClearCollect has some invalid arguments.

     

    Thank you!

  • Community Power Platform Member Profile Picture
    on 13 Oct 2020 at 20:07:44
    Re: How do I refresh a collection ?

    I did this to refresh my collection so I could get a nested gallery to populate after adding an item to that gallery:

     

    ClearCollect(my_collection_holder,my_collection);Clear(my_collection);ClearCollect(my_collection,my_collection_holder);Clear(my_collection_holder);

  • NPrice99 Profile Picture
    1,292 on 10 Jun 2018 at 15:58:49
    Re: How do I refresh a collection ?

    Hi Kris

     

    I have just tried this and I have not "OnStart" on the first screen becuase it is not the first screen in the App.  It is two levels in.

     

    IS there another way to do this ?

     

    Regards

     

    Nigel

     

     

  • NPrice99 Profile Picture
    1,292 on 09 Jun 2018 at 17:33:37
    Re: How do I refresh a collection ?

    Thanks Kris for your help.

     

    The version of PowerApps is 3.18061.12

     

    I finally go this to work by setting the Gallery to a Search(MySPList,”MyValue”.”List Column”)

     

    Not elegant by it worked.

     

    I will try your suggestion.

     

    Regards

     

    Nigel

  • v-xida-msft Profile Picture
    on 09 Jun 2018 at 09:53:01
    Re: How do I refresh a collection ?

    Hi @NigelP,

     

    Could you please share a screenshot of your PowerApps app's configuration?

     

    I have made a test on my side and please take a try with the following workaround:

     

    The OnStart property of the first Screen set to following formula:

    Set(IsStart,true)

    The OnVisible property of the first Screen set to following formula:

    If(IsStart=true,Collect(ItemRecords,Filter('20180609_case12',"" in TaskName)),ClearCollect(ItemRecords,BrowseGallery1.AllItems))

    The OnSelect property of the Submit Button control within your Edit Screen set to following formula:

    SubmitForm(EditForm1);Set(IsStart,false)

    Note: The '20180609_case12' represents the SP list data source within your PowerApps app, the TaskName is a column in my SharePoint list.

     

     

    Best regards,

    Kris

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Building Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 223 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 108

#3
stampcoin Profile Picture

stampcoin 80

Overall leaderboard
Loading started