Display the Field, based on user selection by Radiobutton.!

Certified Associate Developer

a!radioButtonField(
label: "Status",
choiceLabels:{"APPROVE","REJECT","RETURN"},
choiceValues: :{"APPROVE","REJECT","RETURN"} ),

a!paragraphField( 
showwhen(...)

)

*if user selects Reject or Return, then only show the Paragraph field.

  Discussion posts and replies are publicly visible

Parents
  • +1
    Certified Lead Developer

    "ShowWhen" requires a boolean value (or null, which almost always evaluates as "true" by default).  You can pass literally any boolean or "expression that evaluates as a boolean" to a ShowWhen parameter. 

    Beyond this, I typically recommend developers actually establish a local variable that will evaluate the logic and store the resulting boolean itself, as this functional abstraction helps with code readability and cuts way down on repetitive logic when similar code is needed elsewhere on a form (like if you had 4 or 5 fields all relying on the same condition for display, etc).

Reply
  • +1
    Certified Lead Developer

    "ShowWhen" requires a boolean value (or null, which almost always evaluates as "true" by default).  You can pass literally any boolean or "expression that evaluates as a boolean" to a ShowWhen parameter. 

    Beyond this, I typically recommend developers actually establish a local variable that will evaluate the logic and store the resulting boolean itself, as this functional abstraction helps with code readability and cuts way down on repetitive logic when similar code is needed elsewhere on a form (like if you had 4 or 5 fields all relying on the same condition for display, etc).

Children
No Data