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
- 211 bbcon®
- 1.4K Blackbaud Altru®
- 402 Blackbaud Award Management™ and Blackbaud Stewardship Management™
- 1.1K Blackbaud CRM™ and Blackbaud Internet Solutions™
- 15 donorCentrics®
- 360 Blackbaud eTapestry®
- 2.6K Blackbaud Financial Edge NXT®
- 655 Blackbaud Grantmaking™
- 576 Blackbaud Education Management Solutions for Higher Education
- 3.2K Blackbaud Education Management Solutions for K-12 Schools
- 941 Blackbaud Luminate Online® and Blackbaud TeamRaiser®
- 84 JustGiving® from Blackbaud®
- 6.7K Blackbaud Raiser's Edge NXT®
- 3.7K SKY Developer
- 248 ResearchPoint™
- 120 Blackbaud Tuition Management™
- 165 Organizational Best Practices
- 240 Member Lounge (Just for Fun)
- 34 Blackbaud Community Challenges
- 37 PowerUp Challenges
- 3 (Open) PowerUp Challenge: Grid View Batch
- 3 (Closed) PowerUp Challenge: Chat for Blackbaud AI
- 3 (Closed) PowerUp Challenge: Data Health
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Product Update Briefing
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Standard Reports+
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Email Marketing
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Gift Management
- 4 (Closed) Raiser's Edge NXT PowerUp Challenge: Event Management
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Home Page
- 4 (Closed) Raiser's Edge NXT PowerUp Challenge: Standard Reports
- 4 (Closed) Raiser's Edge NXT PowerUp Challenge: Query
- 796 Community News
- 3K Jobs Board
- 54 Blackbaud SKY® Reporting Announcements
- 47 Blackbaud CRM Higher Ed Product Advisory Group (HE PAG)
- 19 Blackbaud CRM Product Advisory Group (BBCRM PAG)
