
Announcements
I have a Form which I use for New items as well as Edit ones and aa button which submits the form. The form has an OnSuccess Statement which navigates to a different screen depending on whether the user is creating a new item or editing an existing one. Or at least, that's what it should do.
If(Form1.Mode=FormMode.Edit,Navigate(Screen1,ScreenTransition.Cover),
Form1.Mode=FormMode.New,Navigate('Choose booking',ScreenTransition.Cover))
However, it seems to ignore the logic and just send the user to the first option (Screen 1) all the time! I've also tried to bind the onSuccess logic to the submit button text (If it's "Create" navigate to screen 1, otherwise navigate to screen 2) and this also just constantly sends it to option 1
What am I doing wrong here?
Hi @RobbyT69 ,
You are doing nothing wrong - the form is no longer in that mode after submission. You need to set a Variable before you submit the form, then base the navigation on the Variable.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
MVP (Business Applications) Visit my blog Practical Power Apps