cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Grichardson
Level: Powered On

Patch not updating with Navigate in OnSelect

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_xSmiley Very HappyataCardValue85.Selected, Conflict_x0020_descriptionSmiley Very HappyataCardValue103.Text,
Staff_x0020_IDSmiley Very HappyataCardValue73.Text,
Type_x0020_of_x0020_conflictSmiley Very HappyataCardValue75.Selected,
Date_conflict_reportedSmiley Very HappyataCardValue83.SelectedDate,
Address_x0020_conflict_x0020_detSmiley Very HappyataCardValue86.Text,
Comp_x0020_EmployerSmiley Very HappyataCardValue110.Selected,Employee_x0020_CommentsSmiley Very HappyataCardValue112.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

1 REPLY 1
Community Support Team
Community Support Team

Re: Patch not updating with Navigate in OnSelect

Hi @Grichardson,

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,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

PowerApps Monthly Community Call

Next Wednesday, August 21st at 8am PDT

Top Community Contributors for July 2019

Top Community Contributors for July 2019

Let's thank our top community contributors

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

FifthImage

Dynamics 365 and Power Platform April 2019 Release notes

Features releasing from April 2019 through September 2019!

SixthImage

Power Summit Australia 2019

August 20-23rd 2019

Users Online
Currently online: 288 members 4,076 guests
Please welcome our newest community members: