Showing results for 
Search instead for 
Did you mean: 
Continued Contributor
Continued Contributor

Variable resets when navigating to another screen

Happy Friday All,


I am having an issue with one of my variables..


I have a button that will remove items from a SPO list, and then navigates to a gallery of items for my users to select.  If they hit that button, they want to edit their items.  The gallery items are set to edit when the Var = true.

I want the variable to be set to true so they don't have to click edit when they enter the gallery. (Too many clicks BAD!!)


On the button I added the below code.

After this fires off and navigates to the other gallery, variable it is not set. (no value ??!!) 

If I remove the navigate it sets it fine. 

The only time I set it to false is after a save and "On Start" of app. 

Does the navigate clear variables?? (that would be bad)

I don't reset the gallery 

EmployeeEmailAddress = VarUserID &&
Period = Var_CurrPeriod);

Navigate(Gallery3,ScreenTransition.None) ;






Just chiming in to endorse @RandyHayes 's endorsement of With() - this blog may be useful to you.

Helpful resources

PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,303)