Required When property

Use the Required When property to specify the conditions under which a value for this component is required. If you reference variables, other components, or properties on collections on the form, WinStudio creates dependencies so that, when those values change, the condition is automatically executed.

To specify the conditions under which the component is required, click the ellipsis (...) button next to the property.

For conditional expressions greater than 50 characters, the system creates a variable to hold the expression. In the Component properties sheet and component list dialog box, the variable is displayed instead of the expression; in the Edit Set of Conditional Actions dialog box mentioned below, the conditional expression is displayed.

Note:  If you are using the Use Free Form option for a component, this field is disabled. If you want to set "required when" conditions, you must use the REQUIREDWHEN keyword in the Free Form Data Type field.

Syntax

Use the Edit Set of Conditional Actions dialog box (displayed by the browse button) to build the appropriate expression.

Example

In this example, when the Credit Hold field is selected, the Credit Hold Date field becomes required:

Required:#C(CreditHoldDateEdit), #C(CreditHoldEdit) = "1","True"
Related topics