I am not sure if this is possible, but can we have a display text for a radio button and a value? For example the display text for an option to be: "Hello world" but the value when selected = true? I am not finding anything in the documentation that refers to this.
https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/controls/control-radio
Solved! Go to Solution.
This is pretty simple using the Table function for the Radio button's Items property.
Table({Key: "Hello World", Value:1},{Key: "Good By World", Value:2})
This will result in the Radio button selected value being a record. This means you can use the Radio button's Selected property to define the value you have assigned in the table.
Radio1.Selected.Value
So when Radio1.Selected text is "Hello World" the Radio1.Selected value will be "1".
You can use a workaround logic like;
If ( Radio1.Selected.Value="Hello World",true,false)
------------
If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.
Hi@BrittanyR,
Based on the issue that you mentioned, do you want to display a text like "Hello World" when you on selecting the Radio button options?
Could you please share a bit more about the scenario, do you want to set the boolean values for the Radion button options?
If my understanding is correct, I am afraid that there is no way to achieve this currently in PowerApps.
You want to set two options like true or false for the Radio button. Further, when you select the true option, the Radio button should display "Hello World" rather than "true". The Radio button does have the display text, but it displays only depends on the Items property you set for it. If you set the Items as a Table containing items like "true" or "false", the Radio button only displays the corresponding item to what you select.
As an alternative solution, if you want to display a custom text when the Radio button selected value is "true", I think controlling the Visible property of a Label could achieve your needs.
I have a test on my side, please take a try as below:
Set the Items property of the Radio button as below:
["true","false"]
Add a Label and set the Text property as below:
"Hello World"
Set the Visible property of the Label as below:
If(Radio1.Selected.Value="true",true,false)
Note: Every time you select the true option, the Label will pop up to display the "Hello World".
If this could not solve your problem, please provide more details.
Best Regards,
Qi
@v-qiaqi-msft no, I want to do like a text/value for the radio button, in that the first option says "Hello world" but when selected its inner value = 1, second option = "Hello world 2" but when selected value = 2.
Can you explain further the inner value?
Possible a screenshot will help.
------------
If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.
This is pretty simple using the Table function for the Radio button's Items property.
Table({Key: "Hello World", Value:1},{Key: "Good By World", Value:2})
This will result in the Radio button selected value being a record. This means you can use the Radio button's Selected property to define the value you have assigned in the table.
Radio1.Selected.Value
So when Radio1.Selected text is "Hello World" the Radio1.Selected value will be "1".
Exactly what I needed! Thanks.
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 |
---|---|
205 | |
187 | |
82 | |
50 | |
37 |
User | Count |
---|---|
288 | |
244 | |
123 | |
75 | |
56 |