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 variables for n...
Power Apps
Unanswered

Global variables for navigation

(0) ShareShare
ReportReport
Posted on by 18

Hello, I was wondering if it's a good idea to use global variables to track navigation through a PowerApp, and if so how to implement this. My app will start with a home page, and from there the user can choose options that'll take them down a hierarchy. For instance, they'll start with several "organizations" to choose from. They pick one organization and are taken to a page with all the "suborganizations" within that organization, and so on.

 

Currently I'm trying to do this with global variables. After selecting an organization, I use the Navigate and Set functions to navigate to the appropriate page and set a global variable containing their choice. I want this global variable to do double duty: one, to filter which suborgs, etc are shown later on; and two, to appear in a breadcrumb trail that'll let the user easily see their choices thus far and go back if needed. However, I'm not experienced with PowerApps and don't know whether this is even feasible. I don't know how to access global variables in other pages either. I hope someone can point me in the right direction.

Categories:
  • Ismael_Novo Profile Picture
    308 on at

    Hello Steve130,

     

    Global variables defined with SET are accessible from the entire application. If you create a component to make a menu it seems that they are not visible but in reality you only have to activate an option for the component to have access to the global scope.

     

    The local variables UpdateContext are the ones that are only visible in the view where they are declared.

     

    What you comment does not seem bad idea, if you find some more concrete problem comment it and we analyze it.

     

    Greetings.

  • WarrenBelz Profile Picture
    156,770 Most Valuable Professional on at

    Hi @Steve130 ,

    I don't think it will save you much time, but you can make a collection like this

    ClearCollect(
     colScreens,
     {
     Function: "Case1" Screen: MainScreen,
     Function: "Case2" Screen: EditScreen,
     Function: "Case3" Screen: ViewScreen
     }
    )

    and do a LookUp to the screen, but to be honest, it is probably shorter to simply type in the screen name.

     

    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.

    Visit my blog Practical Power Apps

  • Steve130 Profile Picture
    18 on at

    Hi Ismael_Novo,

     

    I apologize for the delayed response, thank you. You said I have to activate an option for a component to gain access to the global scope. What is it and how do I activate it?

     

    Also to elaborate on what I'm trying to do: I have a global variable named capability that I want to use to filter a list in another page. This is what I attempted:

    Filter('Table_of_services', "capability" in Lower(ParentCapability))

     but it obviously didn't work.

     

    I appreciate the responses.

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 258

#3
Mohsin Ali Profile Picture

Mohsin Ali 231

Last 30 days Overall leaderboard