=load( local!firstCheckBox; local!secondCheckBox; local!secondCheckBoxLabels: {"a", "b", "c", "d"}; local!secondCheckBoxValues: {1, 2, 3, 4}; with( a!formLayout( label: "MultipleCheckbox Selection", instructions: "", firstColumnContents: { a!sectionLayout( label: "", firstColumnContents: { a!checkboxField( label: "Exchanges", labelPosition: "ABOVE", choiceLabels: {"CBOT", "CME", "COMEX", "NYMEX"}, choiceValues: {1, 2, 3, 4}, value: local!firstCheckBox, saveInto: local!firstCheckBox, validations: {} ) }, secondColumnContents: { a!checkboxField( label: "Class", labelPosition: "ABOVE", choiceLabels: if(isnull(local!firstCheckBox), local!secondCheckBoxLabels, fn!apply(index(local!secondCheckBoxLabels, _, null), fn!apply(wherecontains(_, local!secondCheckBoxValues), {local!firstCheckBox})) ), choiceValues: if(isnull(local!firstCheckBox), local!secondCheckBoxValues, fn!apply(index(local!secondCheckBoxValues, _, null), fn!apply(wherecontains(_, local!secondCheckBoxValues), {local!firstCheckBox})) ), value: local!secondCheckBox, saveInto: local!secondCheckBox, validations: {} ) } ) }, secondColumnContents: {}, buttons: a!buttonLayout( primaryButtons: { a!buttonWidgetSubmit( label: "Submit", style: "PRIMARY", saveInto: {} ) }, secondaryButtons: { a!buttonWidgetSubmit( label: "Cancel", style: "NORMAL", value: true, saveInto: {}, skipValidation: true ) } ), validations: {} )))