Behaviours - Checkboxes getValue() not empty

Steven Mustari
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 24, 2020

I have a screen that has a behaviour to conditionally show fields based on checkbox selection. The issue I'm running into is when the checkbox is empty it is retaining a value.

I set Help text to show the value at any given time to help diagnose this, and when I unselect the last value, it is retaining the last value in the field. Is there any way around this?

Regards,
Steven

1 answer

1 accepted

1 vote
Answer accepted
Steven Mustari
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 24, 2020

For anyone else running into this:

This happened because I was using

def selectedOption = loeReq.getValue() as String

instead of

def selectedOption = loeReq.getValue().toString()

 

Suggest an answer

Log in or Sign up to answer