The behavior you're encountering in Power Apps is likely due to caching or timing issues in the SharePointIntegration context when determining which screen to navigate to during the first edit attempt.
Force a Refresh on the SharePointIntegration Context
Refresh('YourSharePointList'); // Replace with your actual list name
If(
SharePointIntegration.Selected.Stage.Value = "First",
EditForm(FormFirst);
Navigate(screenFirstForm),
EditForm(FormSecond);
Navigate(screenSecondForm)
)
Use a Timer for Delayed Execution
Modify the OnEdit formula to start the timer - Set(NavigateToForm, SharePointIntegration.Selected.Stage.Value);
Timer1.Start();
OnTimerEnd property, add the navigation logic - If(
NavigateToForm = "First",
EditForm(FormFirst);
Navigate(screenFirstForm),
EditForm(FormSecond);
Navigate(screenSecondForm)
);
In the OnStart property of the app, Set(Preload, false);
Navigate(screenFirstForm);
Navigate(screenSecondForm);
Navigate(DefaultScreen); // Replace with your default screen
Pls try and let me know if you have issues.