Boolean attributes have 2 states: on or off, which are represented by 1 and 0. So, you're formula should read something like this: (attribute_name == 1) ? (formula if checked) : (formula if unchecked)