I have a button in an EditForm that either adds or edits info. I had the OnSelect property for the button set as this:
If(EditForm1.Mode = FormMode.New,Navigate(MainScreen,Cover),Navigate(DetailsScreen1,ScreenTransition.Cover))
It always went back to the DetailScreen though, even if the FormMode was New, which should take it back to the main app screen.
So I found the OnSuccess property of the EditForm and changed it from Back() to:
If(EditForm1.Mode = FormMode.New,Navigate(MainScreen,Cover),Navigate(DetailsScreen1,ScreenTransition.Cover))
But it does the same thing. Adding or Editing a record returns it to the DetailScreen, never to the MainScreen.
What am I doing wrong?