Hi everyone,
currently working on a project that involves patching an entire collection to a sharepoint online list. I am using the following syntax that I've found also on a thread:
UpdateContext({msg:"Executing Patch"});
UpdateContext({ patchResult:ForAll(OfflineData,Patch(Timekeeping,Defaults(Timekeeping),{Title:1})) });
If(Not(IsBlank(patchResult)) And IsEmpty(Errors(OfflineData)),UpdateContext({msg:"Patch success"}),UpdateContext({msg:"Patch Failed"});SaveData(OfflineData,"OfflineCache"))
What I'm aiming for is to check whether the Patching is successful or not.
Currently, even if I'm disconnected, it still prompts me that the patch has been successful and opens a popup browser on my phone.
Appreciate any kind of help!
Solved! Go to Solution.
Hi @zdames,
Could you please share a bit more about the Timekeeping data source? Is it a SP list?
Does the OfflineData represent the Collection that you want to save to your SP list?
Based on the formula that you provided, I think there is something wrong with it. Please modify your formula as below:
UpdateContext({msg:"Executing Patch"}); UpdateContext({patchResult: ForAll(OfflineData,Patch(Timekeeping,Defaults(Timekeeping),{Title:1}))}); If(
!IsEmpty(patchResult) && IsEmpty(Errors(Timekeeping)), /* <-- Modify here. Type your Timekeeping SP List data source within the Errors function rather than the OfflineData */
UpdateContext({msg:"Patch success"}),
UpdateContext({msg:"Patch Failed"});SaveData(OfflineData,"OfflineCache")
)
then check if the issue is solved.
More details about the Errors function, please check the following article:
Best regards,
Kris
Hi @zdames,
Could you please share a bit more about the Timekeeping data source? Is it a SP list?
Does the OfflineData represent the Collection that you want to save to your SP list?
Based on the formula that you provided, I think there is something wrong with it. Please modify your formula as below:
UpdateContext({msg:"Executing Patch"}); UpdateContext({patchResult: ForAll(OfflineData,Patch(Timekeeping,Defaults(Timekeeping),{Title:1}))}); If(
!IsEmpty(patchResult) && IsEmpty(Errors(Timekeeping)), /* <-- Modify here. Type your Timekeeping SP List data source within the Errors function rather than the OfflineData */
UpdateContext({msg:"Patch success"}),
UpdateContext({msg:"Patch Failed"});SaveData(OfflineData,"OfflineCache")
)
then check if the issue is solved.
More details about the Errors function, please check the following article:
Best regards,
Kris
Check out new user group experience and if you are a leader please create your group
Did you miss the call?? Check out the Power Apps Community Call here!
See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.
User | Count |
---|---|
259 | |
217 | |
76 | |
38 | |
34 |
User | Count |
---|---|
331 | |
224 | |
125 | |
69 | |
55 |