Skip to main content

Notifications

Community site session details

Community site session details

Session Id : Z+9dktvE/aMtm89VodlG/4
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,284

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,284 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,284 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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,668 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,004 Most Valuable Professional

Leaderboard
Loading started