cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SChappell2580
Helper II
Helper II

Navigate to different screen after patch is succesful

Hi im wondering if anyone help

 

I would like the application to navigate to a different screen when it succesfully patches a record to the datasource at the moment I have the following which works fine for creating a record however it is not clear that this has been succesful to the end user.

 

What can I add to the below so that it will navigate to another screen if patch is succesful:

 

Patch(Table1,Defaults(Table1),{FullName:TextInput2.Text,KeystageArea:Dropdown5.Selected.Value, MealType:Dropdown6.Selected.Value,BreadChoice:Dropdown7.Selected.Value,BreadFilling:Dropdown8.Selected.Value,Date:Label3.Text})

 

Thanks

 

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
claudiosvcc
Power Apps
Power Apps

Hi,

There are Errors functions you can rely on.

In your case, you'll have something like this:

 

Patch(Table1, Defaults(Table1), { <updates you're doing> }); If(IsEmpty(Errors(Table1, Defaults(Table1))), Navigate(Screen2, ScreenTransition.Fade))

View solution in original post

Just an update here: Defaults(Table1) isn't exactly a record, as it's needed by the Errors function.

You can either not adding the record (just Errors(Table1), which can give you a couple of noise) or trying to find the record you're searching for (e.g., using LookUp)

... or....

It can be easier if you get Patch results.

 

If( !IsBlank( Patch(Table1, Defaults(Table1), {<updates you're doing>}) ), Navigate(Screen2, ScreenTransition.Fade) )

View solution in original post

3 REPLIES 3
claudiosvcc
Power Apps
Power Apps

Hi,

There are Errors functions you can rely on.

In your case, you'll have something like this:

 

Patch(Table1, Defaults(Table1), { <updates you're doing> }); If(IsEmpty(Errors(Table1, Defaults(Table1))), Navigate(Screen2, ScreenTransition.Fade))

View solution in original post

Just an update here: Defaults(Table1) isn't exactly a record, as it's needed by the Errors function.

You can either not adding the record (just Errors(Table1), which can give you a couple of noise) or trying to find the record you're searching for (e.g., using LookUp)

... or....

It can be easier if you get Patch results.

 

If( !IsBlank( Patch(Table1, Defaults(Table1), {<updates you're doing>}) ), Navigate(Screen2, ScreenTransition.Fade) )

View solution in original post

Thanks for taking the time and getting back to me this worked a treat

 

Scott

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,312)