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 / HOW TO UPDATE GLOBAL V...
Power Apps
Answered

HOW TO UPDATE GLOBAL VARIABLE USING COMPONENT BUTTON

(0) ShareShare
ReportReport
Posted on by 45

1. first image - I have a global variable name newRequest set as boolean False.

2. second image - when i click the arrow in gallery it will Set the value of newRequest to TRUE.

3. third image - when I clicked the newRequest botton the newRequest variable should reset back to False. But it didn't

 

How to make the global variable newRequest to back to false again by clicking the component botton new request? please see my component setup image. Thanks in advance

devgianart_0-1623871993870.png

 

Categories:
I have the same question (0)
  • Community Power Platform Member Profile Picture
    on at

    @devgianart 

    In the PowerApps settings is a option to turn on. It’s called something with Behavior, I currently can’t check for the exact name.

     

    once this one is activated you can set an behavior as inputs and use this input on the OnSelect of the button in de component. Once in the screen side of your app you can now enter formulas. So you can put there Set(‘variabele’, ‘set_to’) and every time that button is clicked the variability wil be set. 

    I’ve you have any further questions please let me know.

     

    kind regards

  • devgianart Profile Picture
    45 on at

    @Anonymous what in settings specifically? but on my components setup that I've made is it all correct?

     

  • Community Power Platform Member Profile Picture
    on at

    @devgianart 

    In the PowerApps menu by pressing File -> settings

    there is a list of experimental features. One of those is Behavioral components. This one needs to be activated by pressing the side. 

    You cannot directly use app specific code such as a Set(variable, set_to) in a component.

     

    In order to make this working you need to add an input on the component, this can be a text but should be a behavior (only visable after change settings). Then in the OnSelect you want to call the input. Therefore you enter the component name followed by a . and the input name, it will look something like this: Component1.BehaviorInput.Text

    don’t quote me on the .Text, that’s something I’ve to check. 
    once on the screen side of the app you use the component and fill in on the input of the component Set(variable, set_to). 

    I hope I’ve made it a bit clearer, I’ve you have any further questions please let me know. 

    kind regards 

  • devgianart Profile Picture
    45 on at

     

    Did you mean like this? 

    devgianart_0-1623875570969.png

    and this one? 

    devgianart_1-1623875663504.png

     

  • devgianart Profile Picture
    45 on at

    Can you show me if it's working for you? so that I can accept this as solution

  • devgianart Profile Picture
    45 on at

    Hello sir @Pstork1 , I know you're great with this. Can you help me with this problem? thanks!

  • Community Power Platform Member Profile Picture
    on at

    @devgianart 
    Here is how i made this working.

     

    First in the setting set that item to true,

    Than make a behaviour that I called OnSelectButton
    Implement this in your OnSelect

    On your screen side, there you can enter the Set() function.

     

    I hope this is some more explaining with those images.

  • devgianart Profile Picture
    45 on at

    hello @Anonymous  thanks for sticking up with this topic. here's what I do but still not changing.

    devgianart_0-1623921732556.png

     

  • Verified answer
    Community Power Platform Member Profile Picture
    on at

    @devgianart 

    I think i see the issue. On your Set(gvRequestId, false) you set your gvRequestId to false so the text will be false. If you want to change te false to true and vise versa by clicking the button you can when you click OnStart of your app to Set(gvRequestId, starup variable) and on the OnButtonSelect Set(gvRequestId, !gvRequestId)

     

    Ps. you have to reopen the app in order to make this workin, you're not the first to have that issue 😉

     

    Kind regards

  • devgianart Profile Picture
    45 on at

    Thanks finally got this one. Many thanks for clear explanation @Anonymous 

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 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard