How to populate dynamic check boxes based on single selection list box?

As a beginner in Appian, we have requirement to display bunch of check boxes based on selection from single selection list box.

The vales of check boxes is from external RDBMS based on the list box selection.

Such requirement could be achieved by Ajax, how do we approach this in Appian?

  Discussion posts and replies are publicly visible

Parents
  • You'll want to get the choices for your checkboxes from a local variable within the with() that queries the RDBMS based on the selection from the list box.  See below for an example:

     

    load(  
      local!selection,
      local!checkboxSelection,
      with(
        local!checkboxValues: rule!queryCheckboxvalues(input: local!selection),
        a!formLayout(
          contents: {
            a!dropdownField(
              label: "Single Selection",
              value: local!selection,
              saveInto: local!selection,
              choiceValues: {"Choice One", "Choice Two"},
              choiceLabels: {"Choice One", "Choice Two"}
            ),
            a!checkboxField(
              label: "Dynamic Checkbox",
              choiceValues: local!checkboxValues,
              choiceLabels: local!checkboxValues,
              value: local!checkboxSelection,
              saveInto: local!checkboxSelection
            )
          }
        )
      )
    )

  • thanks for the solution. the approach is reasonable and probably will work. however I am unable to test it due to trial session expire.
Reply Children
No Data