web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Global variable is not...
Power Apps
Suggested Answer

Global variable is not passing to other pages

(0) ShareShare
ReportReport
Posted on by 10
 Hi,
 
I have been working on creating my own app and I'm trying to pass a variable from one page to another (not from one screen to another) and for some reason it's not populating even though it says "Global Variables are defined across the app and can be referenced by other screens. Maybe I'm miss interpreting it but regardless I need to pass a variable from one page to another. I have set the variable:
 
Set(selected, Associated.Selected.'Name'); # This is selected from a table within the page
selected; # This is checking that the variable is holding the information on row select, it does hold the value check video
Navigate('Directory', ScreenTransition.None, selected# I get issues with this because it says the 'Directory' (The other page) is not a control or a screen for this page of the app
 
I also attempted it with a button and it still refused to pass the variable to the other page:
Set(selected, Associated.Selected.'Name');
selected;
Navigate(ToBOM, ScreenTransition.None, {selected : Associated.Selected.'Name'}) # ToBOM is the button (or "Control") that I was attempting to use
 
I'm really at a loss here because it should be defined across the app not just across one page of the app. SOS
 
Project Directory Global Value Holding.png
Next Page Global Doesnt Exist.png
Categories:
I have the same question (0)
  • Suggested answer
    MS.Ragavendar Profile Picture
    7,222 Super User 2026 Season 1 on at
     
    I would like to understand, Global Variable means global across the screens in the app no need to pass from the one screen to another screen.
     
     
     
     
    🏷️ Please tag me @MS.Ragavendar if you still have any queries related to the solution or issue persists.
    ✅ Please click Accept as solution if my post helped you solve your issue and help others who will face the similar issue in future.
    ❤️ Please consider giving it a Like, If the approach was useful in other ways.
  • WarrenBelz Profile Picture
    155,501 Most Valuable Professional on at
    There are a number of things you are duplicating here that may be the cause of your issue. Firstly, let's keep it simple - assuming Associated is the name of the Gallery (galAssociated would be a better naming protocol), you also need to stay away from selected as it is a Reserved Word in Power Apps.
    Set(
       varSelected, 
       Associated.Selected.'Name'
    ); 
    Navigate(
       'Directory', 
       ScreenTransition.None
    )
    If the 'Name' (not a good field title) field in the record selected in the Associated Gallery contained the relevant value, then this certainly will be available as varSelected on the second screen.
     
    Looking at your present code, when you did this
    Navigate(
       ToBOM, 
       ScreenTransition.None, 
       {selected : Associated.Selected.'Name'}
    )
    you actually attempted to set a second Variable (a Context Variable applicable only to the second sereen) with the same name and taking precedent over the Global Variable you might have set earlier.
    I am not sure what effect this had,
    Navigate('Directory', ScreenTransition.None, selected)
    but is not valid syntx that will assist anything.
    So please try the process at the top of the post - it should work for you.
     
    Please click Does this answer your question 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 a Like.
    MVP (Business Applications)    Visit my blog Practical Power Apps    LinkedIn   
  • WarrenBelz Profile Picture
    155,501 Most Valuable Professional on at
    A quick follow-up to see if you received the answer you were looking for or if you need further assistance.

    Please click Does this answer your question 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 a Like.
    MVP (Business Applications)    Visit my blog Practical Power Apps    LinkedIn   

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 385

#2
Vish WR Profile Picture

Vish WR 367

#3
timl Profile Picture

timl 340 Super User 2026 Season 1

Last 30 days Overall leaderboard