Hii,
I am unable to select NA option , for YES or NO Its working fine , how can i resolve this,
i have to save
a!radioButtonField( label: "", choiceLabels: { "Yes", "No", "N/A" }, choiceValues: { 1, 0, "NA" }, value: fv!item['recordType!{f42d5bd8-9c50-4910-b251-13ec6bf9fdb6}GAI App Review.fields.{899275d5-d9e3-4030-9291-883eaf45d2c6}reviewerAnswerBool'], saveInto: { local!a, a!save( fv!item['recordType!{f42d5bd8-9c50-4910-b251-13ec6bf9fdb6}GAI App Review.fields.{899275d5-d9e3-4030-9291-883eaf45d2c6}reviewerAnswerBool'], if(local!a = "NA", {}, local!a) ) },
Discussion posts and replies are publicly visible
"NA" (choiceValues) is not a boolean value, check setting this value to 1 (for example, only for testing purporses)
but duplicate value is not allowed in choice value it is giving error
This modification will not resolve the issue and Appian doesn't accept two same values in the choiceValues parameter. I believe here need to change the datatype of the record field. Boolean only be used for 2 values. Take text for all three options or different integers.
a!localVariables( local!a, a!radioButtonField( label: "", choiceLabels: { "Yes", "No", "N/A" }, choiceValues: { "Yes", "No", "N/A" }, value: local!a, saveInto: { local!a, a!save( local!a, if(local!a = "NA", {}, local!a) ) }, ) )
You cannot store three different values in a boolean. Switch to a text or number type.
technically a boolean can handle yes, no, or null - OP is just doing this incorrectly.
Your main issue here is that you also need to do some trickery in the "value" field to make it work. Without some more advanced trickery, you will need to settle on the radio button starting off with a default selection of "N/A" when the user has not yet made any selection. Otherwise an approach like the following should be very easy:
a!localVariables( local!booleanValue: toboolean(null()), a!radioButtonField( label: "3-way boolean selector", choiceLabels: { "Yes", "No", "Null Value" }, choiceValues: { true(), false(), "null" }, value: if( a!isNullOrEmpty(local!booleanValue), "null", local!booleanValue ), saveInto: { a!save( local!booleanValue, if( save!value = "null", null(), save!value ) ) } ) )