If I understand correctly, you're trying to set up a Radio Button List that displays 'True' and 'False', but saving to a SmartObject data type of 'YesNo'? Something like this:
If so, this can be achieved by adding some static values in the Data Source section of the Radio Button List control.
- Add two values 'true' and 'false' and provide matching Display names
The string values of 'true' or 'false' will correctly save to a 'YesNo' data and display in the SmartObject Tester as a checkbox:
If I have misunderstood your query, could you provide some more detail on what you're trying to achieve?
Hope this helps,
Jonathan
Alternatively, if you're looking to use a SmartObject as the Data Source, you can create a SmartObject with a 'YesNo' field and a 'Text' field for display. This is useful if you required Display names other than 'True' or 'False':
Then add the follewing values via the SmartObject Tester:
ID: 1
YesNo: true
Display: Approved
ID: 2
YesNo: false
Display: Declined
Then set up the Data Source to use a Value of the 'YesNo' field, and a Display of 'Display':
This ensures the data saves as a 'YesNo' data type.
Hello Jonathan.
Thanks for your inputs. You understood what I am trying to do. However, the issue I am having is actually changing the SMO field from a Yes/No to 'Radio', only selections I have are Autocomplete, Data Lable, Drop down list, lable, picker, and text box.
I'm not sure I understand what you mean. Are you trying to convert an existing control on a form? I recommend creating a brand new Radio Button List on a View and then tying it to a Data Source as mentioned above.
Jonathan.
Sorry for confusing you.
I was able to figure out how to create the true/false radio buttons for each smo by creating a grouping, etc.
So in another post I mentioned I created a basic form. I also created a list view/form that I can go in and double click to open past submissions and the data will render into a readonly version of the form. For some reason, the radio buttons do not return their original value.
If I understand what is going on here, you have a SMO with a YesNo data type. You want to configure that for use with a radio button list, but you can't choose YesNo as the data type of the radio button list control, and you can't configure the field of the radio button list to the YesNo data type in the smart object. Here is what I did to get around it.
- (Temporarily) change the smart object field data type to text.
- Configure your radio button list with "true" and "false" for a static list as Johnathan illustrated, and map it to your smart object field.
- Change the smart object field data type back to YesNo.
- Your radio button list control will now be YesNo data type, and will still be configured with your field that is now a YesNo data type.