Lookup Schema

Lookup Schemas are used to create an adaptable Schema that uses a Key and Value pair and can be used to give aliases to static values used in a Rule or Action. There are two main uses for this:

  • Giving Values more meaningful names in the Rules and Actions Builder.

    This could be as simple as taking a machine created value and renaming it to something human-readable.

  •      Example: The Value "01t9Rx8" could be given the alias "Water Mains" making it much easier to tell what is being used in Rule and Action building.

  • Update the Schema to make changes to Rules and Actions.

    Changes can be made to the Schema by changing which Values are linked to Keys. This allows the same Rules and Actions to be run with different Schemas that use the same Key but utilise different Values.

  •      Example: A Rule that looks at a district that a contractor works on changes hands from one contractor to another. Using a Lookup Schema means that the Value can be changed without needing to create a new Rule.

Configuring the Schema

When a new or existing Data Store requires a Lookup Schema it can be added in the Data Store settings.

  1. When configuring a Data Store choose the Lookup Schema option from the Fixed Schema Type drop down menu.

  2. In class and attribute mappings for either Read and Commit and/or Copy To, expand the class you want to work on.

  3. Select the Target field of the String that you want to use as the Key.

         Note: The Key must always be a String.

  4. Select the Target field for the attribute you want to pair it with and select Value.

  5. Repeat Steps 3 and 4 for any other Classes that are necessary.

Using Lookup in Rules and Actions

After configuring the Schema, Lookup Values can be used in a Rule or Action.

  1. Open a Rule or Action and select a Value node.

  2. Choose Named Lookup Value from the Dynamic section.

  3. Click on the Lookup Data Store parameter, and pick the Data Store that you wish to use.

  4. From the Selected Value pick the Key that you wish to use.

         Note: These Keys will be named as they are listed in the file used in the Data Store.