Question on Checkbox Field

I have requirment on Checkbox Field

In Checkbox have the two values like A,B

if you select the A checkbox, B should be hidden and A should be checked
if you select the B checkbox, A should be hidden and B should be checked(Issue is B is checked when clicked away from the checkbox(on screen))
can anyone provide the solution Please?

Thanks

OriginalPostID-227452

OriginalPostID-227452

  Discussion posts and replies are publicly visible

Parents
  • @ramashm - If my understanding is correct, the below code should work for you. Please try this and let me know if any issues.

    load(
    local!checboxA, local!checboxB,
    a!formLayout(
    label: "Test Form",
    firstColumnContents: {
    if(rule!APN_isEmpty(local!checboxB),
    a!checkboxField(
    label: "Checkbox A",
    labelPosition: "ADJACENT",
    choiceLabels:{""},
    choiceValues:{true()},
    value:local!checboxA,
    saveInto: local!checboxA,
    refreshAfter: "UNFOCUS",
    validations: {}
    ),a!textField(readOnly:true())),
    if(rule!APN_isEmpty(local!checboxA),
    a!checkboxField(
    label: "Checkbox B",
    labelPosition: "ADJACENT",
    choiceLabels:{""},
    choiceValues:{true()},
    value:local!checboxB,
    saveInto: local!checboxB,
    refreshAfter: "UNFOCUS",
    validations: {}
    ),a!textField(readOnly:true()))
    }
    )
    )
Reply
  • @ramashm - If my understanding is correct, the below code should work for you. Please try this and let me know if any issues.

    load(
    local!checboxA, local!checboxB,
    a!formLayout(
    label: "Test Form",
    firstColumnContents: {
    if(rule!APN_isEmpty(local!checboxB),
    a!checkboxField(
    label: "Checkbox A",
    labelPosition: "ADJACENT",
    choiceLabels:{""},
    choiceValues:{true()},
    value:local!checboxA,
    saveInto: local!checboxA,
    refreshAfter: "UNFOCUS",
    validations: {}
    ),a!textField(readOnly:true())),
    if(rule!APN_isEmpty(local!checboxA),
    a!checkboxField(
    label: "Checkbox B",
    labelPosition: "ADJACENT",
    choiceLabels:{""},
    choiceValues:{true()},
    value:local!checboxB,
    saveInto: local!checboxB,
    refreshAfter: "UNFOCUS",
    validations: {}
    ),a!textField(readOnly:true()))
    }
    )
    )
Children
No Data