Information Classification: External Restricted.
See https://www.chili-publish.com/security
Variable Document Actions
Concept
See ?Document Actions for more information on the possibilities of Document Actions.
There are a number of ways in which a variable can trigger a Document Action:
- On Change of its own value, to influence other variables
- On change of its own value, to return true/false for its visibility
- On change of its own value, to validate the value
- On change of any variable, to calculate its own value
On Change
The most commnly used action is "On Change". This can be used to manipulate the document based on the value of the current value.
NOTE: if the same logic (eg showing/hiding of a set of layers) is needed in multiple variables, it can be easier to maintain them in ?Document Event Actions. See ?Document Action Triggers for more information
This action can be used to accomplish a whole series of things (again: see ?Document Actions for samples and more information):
- Set values of other variables
- Show/hide a series of layers simultaneously
- Update color values in the document
- Show.hide variables in the input form
- ...
On Change action which shows or hides the layer "text" if the checkbox variable showtxt on or off (simplified for demonstration purposes, because the same can be achieved by binding a variable to the layer's visibility in Layer Settings):
Variable show text layer is unchecked: layer is invisible:
VariableĀ show text layerĀ is checked: layer is shown:
Value Calculation
Possible only for variables of the type "Calculated Field", the value action is used to return the calculated value of the variable (use the "return xxx" statement in the document action to accomplish this.
The value action is triggered by the change of value of any other variable.
Visibility
Return true or false to influence whether the variable should be visible.
The visibility action is triggered by the change of value of any other variable.
Validation
If anything is returned in this action, it is considered that the variable is not valid. The variable will get a warning icon next to it (similar to the one showing when it is empty and its "Required" checkbox is checked), and the tooltip is the value returned from the action
All information on this page must be treated as External Restricted, or more strict. https://www.chili-publish.com/security