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))

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) )

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

 

Scott

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Users online (1,418)