Is there anyway to make the checkbox component accept 1s and 0s as true and false?

I noticed that when i drag and drop a boolean into the view it lets me make checkboxes , its value accepts true and false

however, I am using historical playback from the ignition exchange, which lets you view the old recorded values matched to the time they were recorded , outputting the old values

it works for other Variable types great but for booleans in particular it outputs them as 0’s and 1’s , so the checkbox doesn’t like them because its looking for a true and false in its binding

is there a setting somewhere to make them accept 0s and 1s as well? as this would allow for people to dynamically go back and see when booleans trip at specific times

I will assume that this means you are working in perspective.

I can quickly think of two ways to accomplish this.

  1. convert the value to a boolean at assignment.
self.getSibling("Checkbox").props.selected = bool(value)
  1. create a custom property on the checkbox, bind the selected property to that and use a transform of some kind.
2 Likes

ah heck yea! that worked like a charm , thank you very much