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
How did you do that? I tried but Power App says that the second ClearCollect has some invalid arguments.
Thank you!
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);
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
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
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
WarrenBelz
223
Most Valuable Professional
MS.Ragavendar
108
stampcoin
80