How to I limit a checkbox field to one choice? I am using a checkbox field to ca

Certified Senior Developer
How to I limit a checkbox field to one choice? I am using a checkbox field to capture a 'Y' or 'N' value. This works just fine unless the user checks both boxes. I tried a couple validation rules on the field but none have worked so far. Any suggestions?

a!checkboxField(
label: "Certification Required?",
labelPosition: "ABOVE",
choicelabels: {
"Yes",
"No"
},
choiceValues: {
"Y",
"N"
},
value: ri!newAgreement_cdt.certRequired,
saveInto: ri!selectedAgreement_cdt.certRequire
),

OriginalPostID-191699

OriginalPostID-191699

  Discussion posts and replies are publicly visible

Parents
  • load(
    local!checkboxValue,
    local!checkboxSave,
    a!dashboardLayout(
    firstColumnContents: {
    a!checkboxField(
    label: "Certification Required?",
    labelPosition: "ABOVE",
    choicelabels: {
    "Yes",
    "No"
    },
    choiceValues: {
    "Y",
    "N"
    },
    value: local!checkboxValue,
    saveInto: {
    a!save(target: local!checkboxValue,
    value: if(and(not(rule!APN_isBlank(save!value)), length(save!value)=2),
    local!checkboxValue, save!value
    )),
    a!save(local!checkboxSave,
    local!checkboxValue
    )

    }
    ),
    a!textField(
    label: "Display value: user will have to click away to see second selection disappear",
    value: local!checkboxValue,
    readOnly: true
    ),
    a!textField(
    label: "Saved Value",
    value: local!checkboxSave,
    readOnly: true
    )

    })
    )

    this may be useful
Reply
  • load(
    local!checkboxValue,
    local!checkboxSave,
    a!dashboardLayout(
    firstColumnContents: {
    a!checkboxField(
    label: "Certification Required?",
    labelPosition: "ABOVE",
    choicelabels: {
    "Yes",
    "No"
    },
    choiceValues: {
    "Y",
    "N"
    },
    value: local!checkboxValue,
    saveInto: {
    a!save(target: local!checkboxValue,
    value: if(and(not(rule!APN_isBlank(save!value)), length(save!value)=2),
    local!checkboxValue, save!value
    )),
    a!save(local!checkboxSave,
    local!checkboxValue
    )

    }
    ),
    a!textField(
    label: "Display value: user will have to click away to see second selection disappear",
    value: local!checkboxValue,
    readOnly: true
    ),
    a!textField(
    label: "Saved Value",
    value: local!checkboxSave,
    readOnly: true
    )

    })
    )

    this may be useful
Children
No Data