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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / UpdateIf just stopped ...
Power Apps
Answered

UpdateIf just stopped working after 10 months!

(0) ShareShare
ReportReport
Posted on by 32
Hello everyone, this is a very strange situation. Just yesterday our updateIf code just stopped working in our powerapp, no matter what we tried or did nothing would show that this code was working. 

This has caused a very serious issue and a lot of time will be incurred as a result to correct this. Has anyone else had similar issues? We changed our code to Patch and everything is fine now!

Data source is SQL on premise. 
No delagation limits have been incurred. 

Below is a obfuscated example of our code. Update IF has been commented out due to it not functioning correctly. 

Would be great to know if anyone else experienced this behaviour and if they know why it stopped working?

************************************************** 
 
Set(varUpdate_SupLots,false);
 
IfError(
    
    If(!varDHSHasBeenLoaded,
        
        ForAll(Filter(
                    lstParentChildComponentsForExport,
                    IsParent = 1 && ComponentCode = ThisRecord.ComponentCode && ThisRecord.HasLotAndExpiry && !IsBlank(ThisRecord.Lot)
                ),
                Patch(LotNumbers,LookUp(LotNumbers,LotNumber = If(EndsWith(Lot,"R"),Mid(Lot,1,Len(Lot)-1),Lot)),{IsRework:EndsWith(Lot,"R")})
                //UpdateIf(LotNumbers, LotNumber = If(EndsWith(Lot,"R"),Mid(Lot,1,Len(Lot)-1),Lot), {IsUsed:true, UsedOn:Now(), IsRework:EndsWith(Lot,"R")})
        ),
        
        ForAll(Filter(
                    lstParentChildComponentsForExport,
                    IsParent = 1 && ComponentCode = ThisRecord.ComponentCode && ThisRecord.HasLotAndExpiry && !IsBlank(ThisRecord.Lot)
                ),
                Patch(LotNumbers,LookUp(LotNumbers,LotNumber = If(EndsWith(Lot,"R"),Mid(Lot,1,Len(Lot)-1),Lot)),{IsRework:EndsWith(Lot,"R")})
                //UpdateIf(LotNumbers, LotNumber = If(EndsWith(Lot,"R"),Mid(Lot,1,Len(Lot)-1),Lot), {IsRework:EndsWith(Lot,"R")})
        )
        );
        Set(varUpdate_SupLots,true);,
    Notify("Cannot update lot numbers (Sup Lot)")
);

************************************************** 

Thank you
Categories:
I have the same question (0)
  • Suggested answer
    SebS Profile Picture
    4,616 Moderator on at
    I think the main reason is delegations UpdateIf is not fully delegable 
     
     
    Your code was working untill data reached above 2000 records than it stops cause it was not delegable :(
  • Sulako Profile Picture
    32 on at
    This is 100% not a delegation problem. The table this update writes into is 350,000 rows big and has been for the last year. So this is definately not the cause of this problem.  The filter process gets the specific row to update.

    This is a major issue and the root cause needs to be established!
     
    Hoping someone can provide information. 
     
    regards,
     
  • Verified answer
    WarrenBelz Profile Picture
    153,084 Most Valuable Professional on at
    Just adding to @SebS's valid statement. UpdateIf in it's "native' form will only address data up to your Data Row Limit. Adding the switch 
    enhances the Delegation capabilities to your Data Row Limit after the condiiton has been evaluated (so it will update Data Row Limit selected records).
     
    In your case however, you have included the action (which you have commented out in your post) inside a ForAll statement and when you do this, the limit applies to each "loop" of the ForAll data, so I am not sure how this would work for you (or did in the past).
     
    However I will add that using Patch inside the ForAll as you have done now is a much better and more stable option.
  • Sulako Profile Picture
    32 on at
    Thank you everyone, it turns out some numbers were added to our database which pushed the UpdateIF passed the delegation point. 

    Appreciate everyones help on this.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard