Property watchers allow destination properties to look for value changes in a source property. When changes occur, they trigger the value of the destination property to be set as illustrated in this video:
There are three types of property watchers.
Synch Item Watcher - This type of watcher is typically used with ComboBox properties that specify criteria-based domain lists. This type of watcher can be used to establish relationships between different feature properties. If a match value is provided, the current property’s value must equal this value for the watcher to execute.
Current List Lookup Watcher - This type of watcher sets the specified property, using the data stored in the specified domain list column of the current property. This type of watcher can be used to display more entries from a domain list with multiple columns.
Foreign List Lookup Watcher - This type of watcher sets the specified property by taking the current property's value and looking up a matching entry in the domain list associated with another property. This type of watcher can be used to display extra information (indirectly) related to a feature.
In the following example, a Tree feature is placed with two domain lists. One to define the type of tree (Evergreen or Deciduous) and another to define the Species (Elm, Birch, Pine, etc). The selected tree Type will drive the content of the Species list.
For example, selecting Deciduous, will set the Species list to the include only those trees defined in a Deciduous domain list. Likewise, selecting Evergreen as the type will reset the species list to show only those values in the Evergreen domain list.
The following information describes the details of defining Property Watchers to drive domain lists.
Once the feature has been created, a property for the tree Type is added as a combo box. A domain list specifying two tree types is created in the Domains node and added to the Type property.
The tree Type drives two separate species lists, therefore two criteria are defined in the Criteria node; one for Evergreen and the other for Deciduous.
NOTE: There is a known defect in GSA that prevents you from typing in the expression directly into the property Use Criteria field. You must pre-create the criteria to use.
A new property for Species is added and assigned the Evergreen and Deciduous domain lists. In addition, the proper Criteria is selected from the dropdown list.
At this point the properties, domain lists and criteria have been defined. The Type property now requires a property watcher that will drive the Species domain lists. This is added easily via the right click menu and choosing Add > Watcher List
This will add a Define Property Watchers tab to the feature definition which allows a Sync Item Watcher to be added .
The details for the property watcher would include:
A sample schema has been provided for learning.
Property Watcher for Domain Lists.zip