Announcements
I added a button and a label. I want to click on the button and then change the text in the label. What I try to do is like the following:
Button: Onselect = label1.text = "abcdedf"
But I don't see any change of text. Can anyone point out my mistake?
HI,
You cannot change the text directly, so you have to use a variable.
In the Button.Onselect you set the variable, either through the Set (for a global variable) or UpdateContext (for a local variable) function, and then you use the variable in the label's Text-property.
Read more about how to use variables here: https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/working-with-variables
Good luck!
So, if we want to use button to control other object. I need to use variable to do it?
I would like to know how can I add an new button to take photo? not using OnSelect function in camera.
Yes, that's a pretty good way to think about it. Variables can be used to drive the state in the application, for example from one control to another.
As far as your camera question, today, clicking on the camera is necessary to capture the currently viewed image in the Photo property of the camera. However, you can still use a Button to capture that photo in a variable for the app, but users must still click on the Camera control first.
so whats the answer? and is there any simplier way to do it?
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.
Congratulations to our community stars!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
11manish 394 Super User 2026 Season 2
Mohsin Ali 328
WarrenBelz 324 Most Valuable Professional