Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Simple checkbox for boolean variable

Hi All

This is conceptually simple, but I'm struggling to implement it. I want to set the value of a boolean variable with a single checkbox. So, assume I have a variable vVariable, I'd like to be able to set it to -1 or 0 (True or False) using a checkbox i.e. when the checkbox is ticked, vVariable is True and when it is not ticked, vVariable is False. (I'm currently attempting this with a List Box with a Windows Checkbox selection style override )

1 Solution

Accepted Solutions
Not applicable
Author

See the attachment

View solution in original post

5 Replies
Not applicable
Author

Hi,

you can assign the below expression to your vVariable.

=

if(GetSelectedCount(User_ID)>0,True(),False

())

Not applicable
Author

See the attachment

Not applicable
Author

Thanks for the prompt replies folks. That worked well !

yakir_manor
Contributor III
Contributor III

you should create a text box and using condition and action make it act like checkbox, that why you can design it any way you want to, see attachment, in this model you can also see how you can base it on a checkbox dimension.

Not applicable
Author

Very cool. Thanks!