Notifications
Announcements
I am trying to define a variable in a button with function Set(myvar, "xyz");I expect when I use 'myvar' it should print 'xyz', but it is showing nothing, and when I checked on the variable list I can see the only myvar with no text assign to it.can anyone suggest how can i fix the issue?
thanks
Abhishek
Set only defines and/or sets the variable. If you want to show the variable's text, you need to insert a lable und set myvar as text property
thank you for addressing the issue.I inserted text label, set myvar as the text property, still its not showing the value of variable, please refer to attached screenshot.
Hello @abhishek20531 have you clicked the button? You have an expression in the button that will set the variable 'myvar' to the value you want ("xyz"), but it will only be executed when the button is selected (it is defined in the button's OnSelect property). Until a variable is set, its value is Blank, which is probably what you are seeing in your app.
Hope this helps!
Hi, @Carlos , I did select the button. I can see it recognizing the variable, but its not storing the value. I tried every possible thing. I checked on different forums, view few videos. Even after replicating same steps, I am not able to identify the bug.
HI @moritz0815 , I also tried using table, attached in the screenshot, the issue is still the same, it can recognize the variable because the syntax is right but still can't store the value,
I actually believe, just like @CarlosFigueira wrote, that you didn't press the button. Hold down the 'Alt' key and click on your button.
@moritz0815 thank you. I have been so silly, I was missing to hold the Alt key
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.
In our never-ending quest to improve we are simplifying the forum hierarchy…
We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
WarrenBelz 721 Most Valuable Professional
Michael E. Gernaey 320 Super User 2025 Season 2
Power Platform 1919 268