Bentley Map V8i (SELECTseries 10) Help

Property Watchers

Property watchers allow one or more properties to watch for changes in the source property. When added to a property (the source property), each time its value changes the related properties are triggered to respond.

A property watcher watches for a certain value in one (source) property which then determines an associated pre-defined value in another.

For example, a feature to place an address could have four properties: State, County, City and Street. The first three are ComboBox properties; the last one is a TextBox property. When a user selects a state from the State selection list, the content of the County selection list should be changed, to show only the counties in the selected state. The same should happen with the cities list after selecting a county.

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.

The Address feature in the geo_example project delivered with Bentley Map contains property watchers. It enables the correct County to be listed when a State is selected and the correct City to be listed when a County is selected.