Defaulted checkboxes

Hi All

Just curious if anyone has come across a situation where, based on what is selected in a dropdown field, certain checkboxes would appear already ticked and with the value/s stored in an ri? I was able to have the default values selected based on a selected item in the dropdown field, but the value/s would not save to the ri.

Thanks in advance.

OriginalPostID-231989

  Discussion posts and replies are publicly visible

Parents
  • As mentioned try below code.
    Note: rule input is multiple text values

    load(
    local!test,
    a!sectionLayout(
    label: "",
    firstColumnContents: {
    a!dropdownField(
    label: "Dropdown1",
    labelPosition: "ABOVE",
    choiceLabels:{"value1","Value2"},
    placeholderLabel:"---Select a Value---",
    choiceValues:{"value1","Value2"},
    value:local!test,
    saveInto: {local!test,
    a!save(ri!checkBoxValues,local!test)
    },
    refreshAfter: "UNFOCUS",
    validations: {}
    ),
    a!checkboxField(
    label: "Checkbox",
    labelPosition: "ABOVE",
    choiceLabels:{"value1","Value2"},
    choiceValues:{"value1","Value2"},
    value:local!test,
    saveInto: {ri!checkBoxValues},
    refreshAfter: "UNFOCUS",
    validations: {}
    ) },
    secondColumnContents: {
    },
    validations: {}
    )
    )
Reply
  • As mentioned try below code.
    Note: rule input is multiple text values

    load(
    local!test,
    a!sectionLayout(
    label: "",
    firstColumnContents: {
    a!dropdownField(
    label: "Dropdown1",
    labelPosition: "ABOVE",
    choiceLabels:{"value1","Value2"},
    placeholderLabel:"---Select a Value---",
    choiceValues:{"value1","Value2"},
    value:local!test,
    saveInto: {local!test,
    a!save(ri!checkBoxValues,local!test)
    },
    refreshAfter: "UNFOCUS",
    validations: {}
    ),
    a!checkboxField(
    label: "Checkbox",
    labelPosition: "ABOVE",
    choiceLabels:{"value1","Value2"},
    choiceValues:{"value1","Value2"},
    value:local!test,
    saveInto: {ri!checkBoxValues},
    refreshAfter: "UNFOCUS",
    validations: {}
    ) },
    secondColumnContents: {
    },
    validations: {}
    )
    )
Children
No Data