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
  • I tried calling 3 values in the checkbox {"C","A","B"} and tried giving the condition only to A and B like hide and show values, Now, I called in the Label like this

    a!checkboxField(
    label: "Lorem Ipsum"&a!checkboxField(label: "Lorem Ipsum",
    labelPosition: "ABOVE",
    choiceLabels:if(ri!text="A",{"A"},if(ri!text="B",{"B"},{"C","A","B"})),
    choiceValues:if(ri!text="A",{"A"},if(ri!text="B",{"B"},{"C","A","B"})),
    value:ri!text,
    saveInto:ri!text),
    labelPosition: "ABOVE",
    choiceLabels:if(ri!text="A",{"A"},if(ri!text="B",{"B"},{"C","A","B"})),
    choiceValues:if(ri!text="A",{"A"},if(ri!text="B",{"B"},{"C","A","B"})),
    value:ri!text,
    saveInto:ri!text,

    validations: {},
    align: "LEFT"
    )

    Then when I select A the value which is showing is 1 by the time you click on it , but when you do a click away from the screen it is trying to reset the values in the checkboxes. That means initially when the screen loads, the value of A in this case is 2 but after our condition the value of A is 1 but once u click away from the checkbox this is getting refreshed and the checkbox is getting selected, the same is in case of B as well,

    As far I know that is the reason why you are not able to get the checkbox selected for B, This is just my try I might not be correct in the understanding.
    Hope this would help !!!
Reply
  • I tried calling 3 values in the checkbox {"C","A","B"} and tried giving the condition only to A and B like hide and show values, Now, I called in the Label like this

    a!checkboxField(
    label: "Lorem Ipsum"&a!checkboxField(label: "Lorem Ipsum",
    labelPosition: "ABOVE",
    choiceLabels:if(ri!text="A",{"A"},if(ri!text="B",{"B"},{"C","A","B"})),
    choiceValues:if(ri!text="A",{"A"},if(ri!text="B",{"B"},{"C","A","B"})),
    value:ri!text,
    saveInto:ri!text),
    labelPosition: "ABOVE",
    choiceLabels:if(ri!text="A",{"A"},if(ri!text="B",{"B"},{"C","A","B"})),
    choiceValues:if(ri!text="A",{"A"},if(ri!text="B",{"B"},{"C","A","B"})),
    value:ri!text,
    saveInto:ri!text,

    validations: {},
    align: "LEFT"
    )

    Then when I select A the value which is showing is 1 by the time you click on it , but when you do a click away from the screen it is trying to reset the values in the checkboxes. That means initially when the screen loads, the value of A in this case is 2 but after our condition the value of A is 1 but once u click away from the checkbox this is getting refreshed and the checkbox is getting selected, the same is in case of B as well,

    As far I know that is the reason why you are not able to get the checkbox selected for B, This is just my try I might not be correct in the understanding.
    Hope this would help !!!
Children
No Data