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 ?
Solved! Go to Solution.
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")
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; "")
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")
To add to the excellent and correct answers that @HarshJaswal 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"})
One more thing, a variable can be either context or global but not both.
Glad that I could help. 🙂
@HarshJaswal @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