Forum Discussion

Eoclean-LH's avatar
Eoclean-LH
Copper Contributor
Feb 18, 2019

DataField visible Checkbox

Hi,
I have a DataField called "Car" it should only be shown when the CheckBox "Car" is true.

It works when I put this into Visible: If(Check_Car.Value=true;true)

 

The problem is when you start a new form the DataField "Car" is shown. You have to select and unselect the Checkbox, then it's gone.

 

Is there a variable i have to put into OnStart to clear the form?

  • Alan Marshall's avatar
    Alan Marshall
    Steel Contributor
    Create a variable using the update context to store the a true false value and make it false by default or use an if to set based on the data, put this in onStart or Onvisible. Set visible value on your car data field to be the variable, it will always be true or false. On the checkbox add an on update to set the variable to the value of the checkbox field itself. I find it's always better to use a variable to store the show hide value rather than reference the field directly. If you need