The value watcher field allows your form to react to changes in data fields. Data is changed as values are entered into the form or options are selected. For example, you might want to set several values on your form when a user selects a checkbox. A value watcher will allow you do that.
To get started, add a Value Watcher from the 'Advanced' tab:
Value Watchers are active just as other fields are. So if a Value Watcher is in a section that is hidden it will only act on data when it is 'shown' (though there is no UI element shown to the user for a Value Watcher).
Configuration options for the value watcher are:
- Value Field - the field that has the value we want to check
- Value Checks - each 'value' is checked against the field value. If a match is found the JSON is applied to the case object
- Otherwise - if no 'value' matches what is in the Value Field then the system will apply this JSON to the case object
- Active Condition - much like visibility conditions, this allows the value watcher to be selectively applied
Here's an example of the above Value Watcher. When we first enter our form the Last Name field is set to 'Davis' since the system didn't find a match for the First Name.
Next, we type 'Intelemage' in the firstName field and the last name changes to 'Support' automatically due to our Value Watcher.
You can have multiple value watchers if desired.