Hi,
I have developed an app that will work offline, when connected I have been able to patch the records from the collection to a sharepoint list. This is working fine, Is there a way to build into the ForAll function to delete the record from the collection once the record has been patched to the sharepoint list?
Thanks in Advance
Solved! Go to Solution.
Hi @Jimbo1,
" have been able to patch the records from the collection to a sharepoint list. "
Could you please explain a bit for how the patch works to save the collection data into SharePoint list?
As shared by @Eickhel, patch function would return the updated record once it succeed, so if here you are using forall () to patch the collection, the formula should be:
Forall(Collection, patch(SPList, ....))
You could either trying the following:
1. Use Collect within the Forall Patch, to collect the updated record, then remove it from the collection:
Forall(Collection, Collect(RemoveData, patch(SPList, ....)))
2. After that, use lookup function to map the record in the old collection, and remove the records found:
Remove(Collection, Filter(Collection, ID in RemoveData.ID))
Regards,
Michael
Hey,
The patch method returns the patched record so you can check if the records have been successfully patched. Regarding the deletion, why don't you use the Clear method to empty the collection?
Hi @Jimbo1,
" have been able to patch the records from the collection to a sharepoint list. "
Could you please explain a bit for how the patch works to save the collection data into SharePoint list?
As shared by @Eickhel, patch function would return the updated record once it succeed, so if here you are using forall () to patch the collection, the formula should be:
Forall(Collection, patch(SPList, ....))
You could either trying the following:
1. Use Collect within the Forall Patch, to collect the updated record, then remove it from the collection:
Forall(Collection, Collect(RemoveData, patch(SPList, ....)))
2. After that, use lookup function to map the record in the old collection, and remove the records found:
Remove(Collection, Filter(Collection, ID in RemoveData.ID))
Regards,
Michael
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 |
---|---|
196 | |
52 | |
41 | |
39 | |
35 |
User | Count |
---|---|
261 | |
85 | |
71 | |
69 | |
66 |