Using a checkbox to show/hide components

I am not sure if i am missing something here.

I place a checkbox on a page and set the tristate to false.

If i try to use the true/false value of the checkbox to set the visability of another component i get the error that i cannot convert type bool? to type bool

If you set the tristate to false does the checkbox remain a bool? ?
How can a checkbox be used to set the visability of another component?

Hi @DarrenW,

You need to create a page property and set both the Value of the Checkbox and the Visible property of the target component to it. That's all.



Here is a sample application.
ToggleComponent.zip (83.5 KB)

Thanks for the reply but this would only work for a page that does not save a record.

If its on an "add" page the value of the checkbox will not be saved to the DB as the value does not attached the checkbox to that field as it is now linked to the page property.

How could i achieve this functionality but also save the value?

I am afraid I don't understand your question. You can set the Value of the CheckBox to any boolean property (or property of a property e.g. ${product.Discontinued})