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 updating wit...
Power Apps
Unanswered

Patch not updating with Navigate in OnSelect

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I have a button on a edit form which should allow users to update the details in the form, the OnSelect code is

 

Patch('COI',Gallery2_3.Selected,{Approved: "Submitted ", ReSubmit:"Yes", Source_x0020_of_x0020_Conflict_x:DataCardValue85.Selected, Conflict_x0020_description:DataCardValue103.Text,
Staff_x0020_ID:DataCardValue73.Text,
Type_x0020_of_x0020_conflict:DataCardValue75.Selected,
Date_conflict_reported:DataCardValue83.SelectedDate,
Address_x0020_conflict_x0020_det:DataCardValue86.Text,
Comp_x0020_Employer:DataCardValue110.Selected,Employee_x0020_Comments:DataCardValue112.Text});
Navigate(SubmissionConfirmation,None)

 

When I make edits to a field and then click the button, I very quickly see that the form refreshes and resets all the values back to what they were originally before the edits.  It then navigates to the SubmissionConfirmatio screen and no updates are saved.

 

If I remove Navigate(SubmissionConfirmation,None) this, it seems to work OK without the Naviagation.  

 

I am sure this used to work previously, any help would be appreciated.

 

Thanks

Categories:
  • v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous,

    Based on the issue that you mentioned, I have also made a test on my side, and don't have the issue that you mentioned. The screenshot as below:1.JPG

    Set the OnSelect property of the "Patch" button to following:

    Patch('20190126_case3', BrowseGallery1.Selected, EditForm1.Updates); 
    Navigate(DetailScreen1, ScreenTransition.Cover)

    On your side, please take a try with the following formula:

    Patch('COI', Gallery2_3.Selected, EditForm1.Updates); /* <-- EditForm1 represents the Edit form control within your app */
    Navigate(SubmissionConfirmation, ScreenTransition.Cover)

    In addition, you could also consider take a try with the following workaround:

    Set the OnSelect property of the "Button" within your Edit form to following:

    If(
    !IsEmpty(
    Errors(
    'COI',
    Patch('COI', Gallery2_3.Selected, EditForm1.Updates)
    )
    ),
    Navigate(SubmissionConfirmation, ScreenTransition.None)
    )

    Please take a try with above solution I provided, then check if the issue is solved.

    If the issue still exists, please consider take a try to re-create a new app based on your data source, then try above solution, check if the issue still exists.

     

    Best regards,

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 395 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 260 Most Valuable Professional

Last 30 days Overall leaderboard