I have a gallery, I have an edit form
When I submit the edit form would like the gallery item to refresh it's card with latest data
Data currently gets loaded to a collection when powerapp starts
"Refresh()" doesn't seem to work.
How would I do this?
ClearCollect?
Thanks,
Terry
Solved! Go to Solution.
Hi @Mattw112IG ,
Do you mean that your data is saved in a collection and the gallery display the data in the collection?
Do you want to refresh the gallery items when you update your data source?
The reason why you met the problem is that:
1)Refresh() function is used to refresh data source, not collection
2)If you update your data source, data in the collection will not be updated automatically, you need to recreate the collection with the latest data of your data source.
So here are two solutions for you choosing:
1)use the data source as the gallery's Items directly, not the collection
Then set the form submit button's OnSelect:
SubmitForm(Formname);Refresh(data source name)
//refresh the data source after you submit data
2)still use the collection as the gallery's Items
set the form submit button's OnSelect:
SubmitForm(Formname);ClearCollect(collectionname,data sourcename)
//recreate collection after you update the data source.
Best regards,
HI @Mattw112IG ,
You need to refresh your data source
Refresh(YourDataSourceName)
This is assuming your gallery Items are directly from the list (not a collection)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Hi @Mattw112IG ,
Do you mean that your data is saved in a collection and the gallery display the data in the collection?
Do you want to refresh the gallery items when you update your data source?
The reason why you met the problem is that:
1)Refresh() function is used to refresh data source, not collection
2)If you update your data source, data in the collection will not be updated automatically, you need to recreate the collection with the latest data of your data source.
So here are two solutions for you choosing:
1)use the data source as the gallery's Items directly, not the collection
Then set the form submit button's OnSelect:
SubmitForm(Formname);Refresh(data source name)
//refresh the data source after you submit data
2)still use the collection as the gallery's Items
set the form submit button's OnSelect:
SubmitForm(Formname);ClearCollect(collectionname,data sourcename)
//recreate collection after you update the data source.
Best regards,
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
187 | |
52 | |
51 | |
36 | |
32 |
User | Count |
---|---|
283 | |
97 | |
89 | |
82 | |
77 |