cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sajarac
Super User
Super User

Radio Button, Default and Lookup

Hi there.

I hope someone could point me in the right direction for this:

 

In my app I have a Radio Button "Radio1" it has a hard core items " ["North","South","East","West"]

 

My edit form is connected with my SharePoint List and in that list I have a text field "Zone"

Basically in my app when the user select a customer form my collection the rest of the fields show the values for that customer.

 

What I can't do is:

I would like to see in my Radio1 the default values in my column Zone. When the form is in view/edit mode. when the form is in New Mode the Radio should be empty.

 

sajarac_0-1622681553753.png

 

thanks in advance for any help.

 

6 REPLIES 6
BCLS776
Super User
Super User

Have you tried toggling a global variable depending on the mode of your form, and then using that with an If statement in the radio button's Default property?

_________________________________________________________________________________________
Help the community help more users by choosing to "Accept as Solution" if this post met your needs. If you liked the post and want to show some appreciation, please give it a Thumbs Up.
CNT
Super User
Super User

@sajarac put the radio inside the data card for Zone and set the Items property of the Radio to Choices([@Orders]. Zone) and the default to Parent.Default 

CNT
Super User
Super User

@sajarac Did it work?

sajarac
Super User
Super User

Hi @CNT. I haven't tried but the column Zones is not a Choices column is a single text line.

Hi @BCLS776. I think that the if statement could work but I don't know how to elaborate. I have tried but the Radio is complaining because is expecting a table value

Ah, the Default property of the radio control doesn't like an If statement within it. Here's how to get around that:

 

With your radio control set up with four choices, (North, South, East, West), add a simple text box and assign its value to the Default field of the radio control:

Label1.Text

 Then set the Text field for the text box using an If statement:

If(Toggle1.Value,"No Choice","North")

In my test example, I use a simple toggle switch to change the condition for the If statement, but you can use a global variable that you Set to true or false depending on your form's mode. "North" in this example can be replaced by any text entry, such as the one from an existing record field.

 

Toggling the variable that controls the text box produces two states for the radio control:
Screenshot 2021-06-03 074815.png

Screenshot 2021-06-03 074901.png

Will that work for your situation?

_________________________________________________________________________________________
Help the community help more users by choosing to "Accept as Solution" if this post met your needs. If you liked the post and want to show some appreciation, please give it a Thumbs Up.

Helpful resources

Announcements
Super User 2 - 2022 Congratulations 768x460.png

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

<
Users online (3,280)