Checkbox's "unchecked" is an empty string

Posted by Rollbase User on 23-May-2010 08:56

for checkboxes, I noticed that when it is defaulted to "unchecked". When we try to query it, we get a return value of an empty string. When we use it as a filter criteria for a Query API, we could not get the record we want to retrieve. For example: "Select id, name from referral where R10118381 = '10195821' and delete_ = false" This query does not give us any results. We also tried the following. "Select id, name from referral where R10118381 = '10195821' and delete_ = ''" When we switched the default value to "checked" and queried it. We got the correct result. The query is similar to this: "Select id, name from referral where R10118381 = '10195821' and delete_ = 1" May I suggest that when saving a checkbox's value, instead of an empty string save 0 for unchecked for consistency. Or may we know how to use a checkbox's unchecked criteria in a query string.

All Replies

Posted by Admin on 23-May-2010 09:39

Just a follow up, as a feature request, can just save 0 as the "unchecked" value so that its consistent with the "checked" value which is 1.

Posted by Admin on 23-May-2010 10:23

I was able to use it as a query filter. I used "is null" to see if its unchecked. But for consistency, may we request that 0 is placed for "unchecked" and 1 for "checked.

Thanks.

Posted by Admin on 23-May-2010 22:18

Please try it now, you should be able to use "true" or "false" for checkboxes.

Posted by Admin on 24-May-2010 02:19

ok thanks.

This thread is closed