I have a radio button with three choices and this is the code for the fill on a shape If(Radio1.Selected.Value = "Works", RGBA(0,255,0,.5), Radio1.Selected.Value = "Has issues", RGBA(255,255,0,.5), Radio1.Selected.Value = "Does not work", RGBA(255,0,0,.6)). The shape defaults to black how can I make it default to white? Also for some reason the first time I click the radio button it will default the rest of the shapes to that color. But the other shapes should stay blank until the radio button is selected.
Solved! Go to Solution.
@powerapps890 Follow below steps:
ClearCollect(RadioItems, "Works","Has issues","Does not work")
If(IsBlankOrError(Radio1.Selected.Value), Color.White, Radio1.Selected.Value = "Works", RGBA(0,255,0,.5), Radio1.Selected.Value = "Has issues", RGBA(255,255,0,.5), Radio1.Selected.Value = "Does not work", RGBA(255,0,0,.6))
Please click Accept as solution if my post helped you solve your issue. This will help others find the correct solution easily. It also closes the item. If the content was useful in other ways, please consider giving it 👍
Try
If(Radio1.Selected.Value = "",White,
Radio1.Selected.Value = "Works", RGBA(0,255,0,.5), Radio1.Selected.Value = "Has issues", RGBA(255,255,0,.5), Radio1.Selected.Value = "Does not work", RGBA(255,0,0,.6))
------------
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.
@powerapps890 Follow below steps:
ClearCollect(RadioItems, "Works","Has issues","Does not work")
If(IsBlankOrError(Radio1.Selected.Value), Color.White, Radio1.Selected.Value = "Works", RGBA(0,255,0,.5), Radio1.Selected.Value = "Has issues", RGBA(255,255,0,.5), Radio1.Selected.Value = "Does not work", RGBA(255,0,0,.6))
Please click Accept as solution if my post helped you solve your issue. This will help others find the correct solution easily. It also closes the item. If the content was useful in other ways, please consider giving it 👍
This works, but there is an issue. If I choose works it will make the first one green and then the next few are still white, but the remaining are green. Why are the rest turning green when they haven't even been selected? @ganeshsanap
What if you try this:
If(IsBlankOrError(Radio1.Selected.Value), Color.White, Radio1.Selected.Value = "Works", RGBA(0,255,0,.5), Radio1.Selected.Value = "Has issues", RGBA(255,255,0,.5), Radio1.Selected.Value = "Does not work", RGBA(255,0,0,.6), Color.White)
@powerapps890 Are you using the same formula and same Radio button for all the shapes? If the radio buttons are different for some shapes then make sure you are referencing to correct radio button in the formula.
Please click Accept as solution if my post helped you solve your issue. This will help others find the correct solution easily. It also closes the item. If the content was useful in other ways, please consider giving it 👍
Yes, it is all in the gallery so there is only one kind of shape and radio button repeated for each item. For some reason when filtering, it will automatically make the color of the first selected button the rest of unselected radio items. @ganeshsanap
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
User | Count |
---|---|
260 | |
127 | |
86 | |
85 | |
68 |