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 / Patch not picking up u...
Power Apps
Answered

Patch not picking up updates

(0) ShareShare
ReportReport
Posted on by 7

I have a multi-screen app that connects to a SharePoint list which works pretty well when a new item is being created but when I am trying to update an item, my patch function does not pick up the changes in my forms.

My initial screen lets the user pick a request type, depending on the request type, it navigates to that screen.

 BAlvarado_2-1706758205462.png

 

Each form has the following code for the property Item:

 

If(IsBlank(SharePointIntegration.Selected),varFormData,SharePointIntegration.Selected)

 

BAlvarado_0-1706757924947.png

 

Each form has a Submit button that has this code for the OnSelect property:

 

Patch(
         'Tracker',
          varFormData,
          GenericForm.Updates
);

If(
          IsEmpty(Errors('Tracker')),
          Notify(
                "Success",
                NotificationType.Success
          );
         Navigate(MainScreen),
         Notify(
                First(Errors('Tracker')).Message,
                NotificationType.Error
                   )
)

 

It works pretty good if I am creating a new list item but if I am updating a list item, it doesn't pick up the changes. Is something wrong with the way I coded my patch function?

 

Hoping to get some insights on here! Thanks!

Categories:
  • WarrenBelz Profile Picture
    156,956 Most Valuable Professional on at

    Hi @BAlvarado ,

    How and when do you set varFormData ?

  • BAlvarado Profile Picture
    7 on at

    Hi @WarrenBelz ,

     

    I set it on my main screen's Submit button:

     

    Switch(
              DataCardValue54.Selected.Value,
              "Branch Inquiry",
                      Set(varFormData,Defaults('Tracker'));
                      Navigate(GenericFormScreen,ScreenTransition.None),
              "Write-Off",
                      Set(varFormData,Defaults('Tracker'));
                      Navigate(WriteOffFormScreen,ScreenTransition.None),
              Set(varFormData,Defaults('Tracker'));
              Navigate(GenericFormScreen,ScreenTransition.None)
    )

  • Verified answer
    WarrenBelz Profile Picture
    156,956 Most Valuable Professional on at

    Hi @BAlvarado ,

    If you re setting varFormData to this

    Set(varFormData,Defaults('Tracker'));

    then this will always write a new record

    Patch(
     'Tracker',
     varFormData,
     GenericForm.Updates
    );

    If You want to update an Item, you need to do this (with your actual ID)

    Patch(
     'Tracker',
     LookUp(
     Tracker,
     ID = YourCurrentRecordID
     ),
     GenericForm.Updates
    );

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

     

  • BAlvarado Profile Picture
    7 on at

    Thank you @WarrenBelz ! That worked for me! I adjusted my patch function to have a conditional statement that checks whether my form mode is new or edit and it worked fantastic! Thank you so much.

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 232 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 202 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 122

Last 30 days Overall leaderboard