Hi @Roberts2727,
Do you want not to navigate to another screen when there is error with the Patch function within your app?
If you don't want to navigate to another screen when there is error with the Patch function within your app, I think the Errors function could achieve your needs.
I have made a test on my side, please take a try with the following workaround:
Note: I don't provide a value for the Title column, which is a Required/mandatory fild in my SP list.
Set the OnSelect proeprty of the "Vote" button to following formula:
If(
IsEmpty(
Errors(
'20181010_case4', /* <-- 20181010_case4 represents my SP list data source */
Patch('20181010_case4',Defaults('20181010_case4'),{Visitors_x0020_Name:"Steven Liu",Company:"SunShine",Checkin_x0020_DateTime:Now()})
)
),
Navigate(NoErrorScreen,ScreenTransition.Cover),
Navigate(HasErrorScreen,ScreenTransition.Fade)
)
On your side, you should type the following fomula within the "Submit" button:
If(
IsEmpty(
Errors(
'YourSPList', /* <-- 20181010_case4 represents my SP list data source */
Patch(
'YourSPList',
Defaults('YourSPList'),
{
Column1: "xxx",
Column2: "xxxx",
Column3: "xxx",
...
}
)
)
),
Navigate(AnotherScreen,ScreenTransition.Cover)
)
The GIF screenshot as below:
In addition, you could also take a try with the following formula within the OnSelect property of the "Submit" button:
Patch(
'YourSPList',
Defaults('YourSPList'),
{
Column1: "xxx",
Column2: "xxxx",
Column3: "xxx",
...
}
);
If(
IsEmpty(Errors('YourSPList')),
Navigate(AnotherScreen,ScreenTransition.Cover)
)
More details about the Errors function in PowerApps, please check the following article:
Errors function
Best regards,
Kris