web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Serious encounter with...
Power Apps
Unanswered

Serious encounter with failed operations and order of operations

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello, on press of a button I have 3 operations in this order:

 

1. Set(varTempID,Patch(A......  INSERTING a line to sharepoint list A and getting line ID as varTempID

2. Patch(B, Defaults(B),{...EventID: varTempID})...... INSERTING a line to sp list B and using varTempID

3. UpdateIf(C,{...EventID: varTempID}..... UPDATING sp list item and using varTempID

 

It has worked flawlessly until today: in one instance for one user, It appears, that 1 and 2 operation failed (no visible error message) but operation 3 succeeded.

 

Process integrity relies on all operations to be successfull. All or nothing.

How to handle this kind of issue? How to ensure that all 3 operations wouldn't fail?

 

I only can imagine some sort of sequential check:

 

perform op 1

check if op 1 ok

   if not ok - error

    if ok - perform op 2

      if not ok - delete op 1

       if ok - perform op 3

       if not ok - delete op 1 and op 2 (but then need to check if op 1 and op 2 is deleted for sure...

Categories:
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    Could you please explain the context of your issue?  Are you dealing with a form or freeform controls on a screen?

    I am trying to figure out why you are doing this.  It appears that you are patching two sharepoint lists in sequence to get the primary ID from list A into list B as a foreign key.  Is that correct?

    Hi @Anonymous 

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Dear @Drrickryp  you are correct. On button press I need to do the following:

    Create an event in list A

    Create  another event in list B

    Update an item in list C

     

    All these operations must work. If only 1 or 2 of 3 works - then it is a dissaster. All these entries are related.

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    Yes I understand but how are the 3 lists related to each other?

    @Anonymous 

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @Drrickryp in the first list I add a row containing Event Information, in the second list I add a row containing Fuel used information and third operation is to update another list - to Check out a vehicle, so no one else could use it. I have a list of all vehicles and if it is checked out by user - user's email is entered in CheckedBy field. In this case Event was not created, Fuel table was not updated and Vehicle was locked by the user.

    The point is that if you check out a vehicle - this is an event. If you check it out you must declare fuel quantity - it goes to second list and second list. This is the design of the app.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 381 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 340

#3
WarrenBelz Profile Picture

WarrenBelz 187 Most Valuable Professional

Last 30 days Overall leaderboard