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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / using a variable in an...
Power Apps
Answered

using a variable in another screen

(0) ShareShare
ReportReport
Posted on by 100

Hello all,

 

So I'm trying to filter my gallery based on a text box. It works if the text box is in same screen. attached are the screenshots, please let me know where am i going wrong. How can I make a value global ? 

 

one.PNGtwo.PNG

Categories:
I have the same question (0)
  • akandis Profile Picture
    393 on at

    Hello @nithishguptak 

     

    You are using UpdateContext() that only works in the context of the screen where created, and is a good practices because this help in the performance of the Power Apps. But when you want to have a global variable you have to use Set(), this can be used in any place of the app.

     

    Set(StatusValue; "")

     

  • Verified answer
    Community Power Platform Member Profile Picture
    on at

    The scope of UpdateContext  is limited to the screen in which it is used. 

     

    Try using Set(). This is used to declare the global variables which you can use throughout the App session.

    Set(StatusValue,"TheValueWhichYouWantToset")
  • timl Profile Picture
    36,411 Super User 2025 Season 2 on at

    To add to the excellent and correct answers that @Anonymous and @akandis have given, I also notice that you're chaining the UpdateContext and Navigate functions with the & operator rather than ;;. If you were to use Set, the syntax would look like this:

    Set(StatusValue; "Sofortmaßnahme definiert");;Navigate(JournalScreen_view;None)

    Just for reference, if you want to use context variables and to pass a value from one screen to another, you can do this by calling Navigate like so:

     

    Navigate(JournalScreen_view;None;{StatusValue:"Sofortmaßnahme definiert"})

     

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @nithishguptak 

    One more thing, a  variable can be either context or global but not both. 

  • nithishguptak Profile Picture
    100 on at

    @Drrickryp @timl @Anonymous @akandis Thanks for saving my time. It worked

  • Community Power Platform Member Profile Picture
    on at

    Glad that I could help. 🙂

  • nithishguptak Profile Picture
    100 on at

    @Anonymous @Drrickryp @timl how do I use toggle to show all the data from the sharepoint in combination with above filter ?

     

    So If i set toggle to true it should show all the fields. also by default all the fields 

  • VasuBM Profile Picture
    3 on at

    Genius!

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard