Hello
If I press on a button I would like:
1. Change the label text
2. Give the text field a new text.
3. Assign another image to the control
How does it work ? Thank you
Solved! Go to Solution.
Apologies guys I have solved it, Set(ButtonText,"Today") on each button go do the same thing for onselect, Set(ButtonText, "Tomorrow") and so on, then go to text field you want the label to show and just type ButtonText.
I was over thinking it. 🙂
Enjoy the rest of your day.
You can try Context Variables,
Basically Change the OnSelect property of the button to be something like
UpdateContext({pressed: true})
Then the Label Text Propety of the label can be something like this
If(pressed = true, "value1", "value2")
Then the Label Default Propety of the text field can be something similar to the above one as well
If(pressed = true, "value1", "value2")
and we can use the a similar formula for image as well by setting the Image Propety to :
If(pressed = true, Image1.Image, Image2.Image)
Hi Guys
Thanks for all your help, This forum always has the answers im looking for. however I am trying to have a button.text update to multiple different text inputs.
For example:
I have a gallery filtering "today" Tasks, I have made show today using onselct UpdateContext({pressed:true}) and text field is If(pressed=true,"Today","") Works perfectly with true false.
How would I have button.text change with other buttons to, "Today", "Tomorrow", "Yesterday"... more than 2 changes?
Any help would be appreciated
thank you most kindly
Apologies guys I have solved it, Set(ButtonText,"Today") on each button go do the same thing for onselect, Set(ButtonText, "Tomorrow") and so on, then go to text field you want the label to show and just type ButtonText.
I was over thinking it. 🙂
Enjoy the rest of your day.
Hello,
i have problem this syntax: If(pressed = true, "value1", "value2")
dont work for me now in 2019 was there any changes or somethin like that?
im getting error: it contains error ParenClose where error is expected.
Thanks for answer,
John
Hi @Corbie
Could you show the syntax you using or a screenshot and I can assist further?
If it is complaining about a parenClose make sure you have all your syntax-correct with "(" ")" and "{" "}" if they are needed.
Hello,
I figure it out: It was cause of differen language in browser.
Thanks for answer anyway.
Stay up tp date on the latest blogs and activities in the community News & Announcements.
Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
User | Count |
---|---|
203 | |
187 | |
81 | |
50 | |
37 |
User | Count |
---|---|
290 | |
244 | |
122 | |
74 | |
55 |