[IGN-15211] Set checkbox default 'indeterminate' within Form Component

Hello,

I’m currently experimenting with the new Perspective Form component in Ignition 8.3.

I want a triState checkbox in my form that defaults to state “Indeterminate” (which seems quite common to me) to ensure an operator can also set it to NOT OK. However I can’t get this to work.

I’ve configured the form widget as follows;

(its missing a “selected”-property as opposed to a normal checkbox-component)

The only way I see to achieve what I want, is by creating a property with the same Id under “props.data” and set its value to “null” in advance.

image

But then, I would have to create this property everytime via a script or something when the form is opened. Which doesn’t really seem ‘clean’ to me and also removes the dynamic aspect of what I’m trying to create.

Because when I cancel the form, it defaults to value “false” → empty checkbox.

Thankyou very much in advance for any help or advice!

Kind regards,

Hi, thank you for your post. We’ll be creating a ticket to address this issue. As a quick workaround for now, you can set up a script to set the checkbox default value to “Indeterminate” and call it via the onStartup and onCancelActionPerformed events on the form component.

Hello, Thank you for your quick response Lina!

This looks much cleaner as what I had in mind. Altough, this will be a bit tricky as the checkboxes will be dynamically created in another script from records in a database.

Based on a input parameter on the view (machine id), different checkboxes with different id’s will be created. This means that the keys under “form.props.data” are not static.

Do you perhaps have any idea how I can make - using your example - the “checkbox”-part after “form.props.data.checkbox” dynamic?

Thanks.