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 / Issue with concurrent ...
Power Apps
Answered

Issue with concurrent function

(0) ShareShare
ReportReport
Posted on by 4

Hi

 

I am having an issue with the concurrent() function. I have a SQL table (Using a SQL server connection) that has three fields which has to be updated when certain conditions are met. I use the UpdateIf function to update these. However when I use the UpdateIf in a Concurrent function to make all three UpdateIf's to run simultaneously I get an error. What am I doing wrong?

 

The function is:

Concurrent(
UpdateIf(
'[dbo].[MRP]';
And(
ParentGUID = Gallery1.Selected.ParentGUID;
IsBlank(Gallery1.Selected.ParentGUID) = false
// IsBlank(Gallery1.Selected.ChildGUID) = false
);
{Mål: DataCardValue6_1.Text}
);
UpdateIf(
'[dbo].[MRP]';
And(
ParentGUID = Gallery1.Selected.ParentGUID;
IsBlank(Gallery1.Selected.ParentGUID) = false
// IsBlank(Gallery1.Selected.ChildGUID) = false
);
{Afsnit: DataCardValue8_1.Selected.Text}
);
UpdateIf(
'[dbo].[MRP]';
And(
ParentGUID = Gallery1.Selected.ParentGUID;
IsBlank(Gallery1.Selected.ParentGUID) = false
// IsBlank(Gallery1.Selected.ChildGUID) = false
);
{Målnr: DataCardValue40.Selected.Value}
)
)

Categories:
I have the same question (0)
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    Hi @HardeepSingh 

    I think that patching the same datasource using concurrent probably "confuses" PowerApps.  From the documentation on Concurrent():

    You can't predict the order in which formulas within the Concurrent function start and end evaluation. Formulas within the Concurrent function shouldn't contain dependencies on other formulas within the same Concurrent function, and Power Apps shows an error if you try.

     

  • HardeepSingh Profile Picture
    4 on at

    Hi Drrickryp

     

    Thank you for a quick answer! Would it be possible to update the three fields using one UpdateIf function or anything similar, as essentially the three functions has the same If conditions? 

  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    @HardeepSingh 

     

    I would recommend you to remove the concurrent function as this will try updating same items at one for different values based on the expression you shared. You can update your expressions to:
    UpdateIf(
    '[dbo].[MRP]';
    And(
    ParentGUID = Gallery1.Selected.ParentGUID;
    IsBlank(Gallery1.Selected.ParentGUID) = false
    // IsBlank(Gallery1.Selected.ChildGUID) = false
    );
    {Mål: DataCardValue6_1.Text}
    );;
    UpdateIf(
    '[dbo].[MRP]';
    And(
    ParentGUID = Gallery1.Selected.ParentGUID;
    IsBlank(Gallery1.Selected.ParentGUID) = false
    // IsBlank(Gallery1.Selected.ChildGUID) = false
    );
    {Afsnit: DataCardValue8_1.Selected.Text}
    );;
    UpdateIf(
    '[dbo].[MRP]';
    And(
    ParentGUID = Gallery1.Selected.ParentGUID;
    IsBlank(Gallery1.Selected.ParentGUID) = false
    // IsBlank(Gallery1.Selected.ChildGUID) = false
    );
    {Målnr: DataCardValue40.Selected.Value}
    )

     


    Hope this Helps!

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @HardeepSingh 

    Take a look at @mdevaney 's blog post.  He has some ideas for how to speed up the process.  https://matthewdevaney.com/patch-multiple-records-in-power-apps-10x-faster/ 

     

     

     

     

     

  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @HardeepSingh 

    Please consider changing your Formula to the following:

    UpdateIf(
     '[dbo].[MRP]';
     ParentGUID = Gallery1.Selected.ParentGUID; 
     {
     Mål: DataCardValue6_1.Text;
     Afsnit: DataCardValue8_1.Selected.Text;
     Målnr: DataCardValue40.Selected.Value
     }
    )

    What you are doing you can do with one UpdateIf.  There is no need to perform three actions on the same record to update 3 columns.

    Also, you can remove the And operation on the Gallery1.Selected.ParentGUID.  If it is empty then this formula will simply do nothing.  If it has a value, then it will perform as expected.

     

    I hope this is helpful for you.

     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
Haque Profile Picture

Haque 70

#2
WarrenBelz Profile Picture

WarrenBelz 64 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 36 Super User 2026 Season 1

Last 30 days Overall leaderboard