Ri allselectedactions shows a null value on click of two radio buttons and submit button .
Attached append snippet
a!columnLayout( contents: { a!radioButtonField( label: "Refund Case Not Created Status" , labelPosition: "ABOVE", choiceLabels: { "Found the Case", "Not Found the Case" }, choiceValues: { "Found", "Not Found" }, value: local!RefundCaseNotCreatedChoice, saveInto: { local!RefundCaseNotCreatedChoice, a!save( local!allSelectedActions, append( { local!allSelectedActions }, { local!RefundCaseNotCreatedChoice } ), ) }, showWhen: if( local!checkNotissuedChoice = "Refund Case Not Created", true(), false() ), required: true, choiceLayout: "STACKED", validations: {} ) } ),
Submit code
a!buttonWidgetSubmit( label: cons!APAC_TEXT_ACTIONS[1], confirmMessage: "Are you sure you want to submit?", value: cons!APAC_TEXT_ACTIONS[1], saveInto: { ri!buttonAction, a!save( ri!allSelectedActions, append( local!allSelectedActions, ri!allSelectedActions ) ) }, style: "PRIMARY", skipValidation: true() )
Discussion posts and replies are publicly visible
Change Submit code :
a!buttonWidgetSubmit( label: cons!APAC_TEXT_ACTIONS[1], confirmMessage: "Are you sure you want to submit?", value: cons!APAC_TEXT_ACTIONS[1], saveInto: { ri!buttonAction, a!save( ri!allselectedactions,if( isnull(ri!allselectedactions), local!allSelectedActions, append( ri!allselectedactions, local!allSelectedActions ) ) ) }, style: "PRIMARY", skipValidation: true())
its working fine , thank you . Can you please explain why extra null was coming?
by default ri value is null ,so your appending null value with your local variable.i.e, when you are hitting submit button,your local variable(value1,value2) is appending with ri value (null) then the result is {value1,value2,null}
Understood. thanks