PowerApp and SharePoint





Hi,
Does anyone know if there is issue with using both SubmitForm and Patch?
We have a PowerApp that has 1 data source, sharepoint list, and in the app, we have an editform that allow editing of some properties of one record and when submitted, the OnSelect handler will issue SubmitForm and then also do a PATCH to patch a few addiitonal fields. We are finding this process to be erroranous at times and for now have found out that SubmitForm is async, meaning by the time the next function is executed, we do not know if SubmitForm actually finished yet or not.
Looking deeper, we found that we should be using the OnSuccess and OnFailure handler on the Edit Form to ensure the SubmitForm is completed (successfully or not) before the next function of PATCH is called.
My question is, is PATCH also async or sychronous?
Comments
-
Hi @Alex Wong, on paper it's synchronous. But because Patch in PowerApps has so many modifiers and also because buttons/data fields have a bunch of checks they do per interaction with the app it sometimes registers to dev/user as fields displaying poorly, or worse data destination showing bad result.
Luckily lots and lots of ways to combat this. The easiest is probably to create and work with a temp/virtual collection for all data handling inside the app.
Then, when you do patch/submit, or anything really make references to the collection instead of the fields.
From there, you can UpdateContext of various variables, or have fields grab/combine/display correct data.
You can definitely use both together. In my experience I like putting a bunch of controls and fail-safes or verification on my submit. (Good practice as is)
The main trick for when you patch is learning the I believe 2 or 3 ways it can assess which record it is updating, also consider how many data rows your patch is searching if it's a high number the data table/collection needs to be sorted/filtered.
Feel free to message for any clarification(s..)!0 -
@Lucien Piekut
Thanks,I'm going to opt for not using SubmitForm and PATCH together, instead, will use SubmitForm and OnSuccess handling to ensure the data update is completed. When needed, will use a global variable for the “current selected item" to avoid issue.
0
Categories
- All Categories
- 6 Blackbaud Community Help
- High Education Program Advisory Group (HE PAG)
- BBCRM PAG Discussions
- Luminate CRM DC Users Group
- DC Luminate CRM Users Group
- Luminate PAG
- 186 bbcon®
- 1.4K Blackbaud Altru®
- 389 Blackbaud Award Management™ and Blackbaud Stewardship Management™
- 1K Blackbaud CRM™ and Blackbaud Internet Solutions™
- 14 donorCentrics®
- 355 Blackbaud eTapestry®
- 2.4K Blackbaud Financial Edge NXT®
- 616 Blackbaud Grantmaking™
- 542 Blackbaud Education Management Solutions for Higher Education
- 33 Blackbaud Impact Edge™
- 3.1K Blackbaud Education Management Solutions for K-12 Schools
- 909 Blackbaud Luminate Online® and Blackbaud TeamRaiser®
- 207 JustGiving® from Blackbaud®
- 6.2K Blackbaud Raiser's Edge NXT®
- 3.5K SKY Developer
- 236 ResearchPoint™
- 116 Blackbaud Tuition Management™
- 375 YourCause® from Blackbaud®
- 160 Organizational Best Practices
- 232 The Tap (Just for Fun)
- 31 Blackbaud Community Challenges
- Blackbaud Consultant’s Community
- 19 PowerUp Challenges
- 3 Raiser's Edge NXT PowerUp Challenge: Gift Management
- 4 Raiser's Edge NXT PowerUp Challenge: Events
- 3 Raiser's Edge NXT PowerUp Challenge: Home Page
- 4 Raiser's Edge NXT PowerUp Challenge: Standard Reports
- 4 Raiser's Edge NXT PowerUp Challenge #1 (Query)
- 71 Blackbaud Community All-Stars Discussions
- 47 Blackbaud CRM Higher Ed Product Advisory Group (HE PAG)
- 743 Community News
- 2.8K Jobs Board
- Community Help Blogs
- 52 Blackbaud SKY® Reporting Announcements
- Blackbaud Consultant’s Community
- 19 Blackbaud CRM Product Advisory Group (BBCRM PAG)
- Blackbaud Francophone Group
- Blackbaud Community™ Discussions
- Blackbaud Francophone Group