Checkboxfield on user interface

a!localVariables(
  local!additionalInfoRequired,
  local!cancelled,
  a!formLayout(
    contents:{
      a!checkboxField(
        labelPosition: "ABOVE",
        choiceLabels: {"additional Info Required"},
        choiceValues: {true},
        value: if(local!additionalInfoRequired, true, null),
        saveInto: a!save(
          local!additionalInfoRequired,
          if(isnull(save!value), false, true),
          a!save(local!cancelled,false)
        ),
      ),
      a!checkboxField(
        labelPosition: "ABOVE",
        choiceLabels: {"additional Info Required"},
        choiceValues: {true},
        value: if(local!cancelled, true, null),
        saveInto: a!save(
          local!cancelled,
          if(isnull(save!value), false, true)
        ),
      )
    },
    buttons:a!buttonLayout(
      primaryButtons:{
        a!buttonWidget(
          label:"Submit",
          submit: true
        )
      }
    )
  )
)

Hi,

My requirement is when I check one checkbox, another checkbox should uncheck(If checked already).

This functionality I am able to achieve with the attached code.

But, I am encountering an issue like, I was unable to "uncheck" the same selected checkbox.

If I remove the code line number 14 (a!save(local!cancelled,false)), then I am unable to fulfill my requirement.

If I use this line, then I am unable to uncheck the same checkbox which I selected.

Any advice, please.

Thanks.

  Discussion posts and replies are publicly visible

Parents Reply Children
No Data