/
Fields and Static Values

Fields and Static Values

Templates could be generic or built for your brands. It’s likely over time with multiple people building Templates that however careful you are with Field naming conventions names may drift from your standards.

It’s also likely that generic Templates in particular Alterians Public Templates may require Fields with different names from those your Templates use.

With mismatched field names Templates that should work together will show as Templates with less than perfect Suitability in the Template Selection Screen filter.

Using our Fields functionality you can map in fields that you know should work, set constants or choose no mapping allowing the Rule to validate as correct.

Select the Template you would like to use and add into the Rule. In Rule Designer a warning red exclamation mark will show between the two Tiles.

Click on the warning which will open the menu and then select Fields.

Fields has two filter options:

  • Filter on Validity

    • Valid - The Field has automapped correctly, user has mapped a Field of the correct type or a constant has been chosen. Only show these mappings.

    • Invalid - The Field has not automapped. The user needs to map a field, enter a constant or choose “No Mapping” to ensure the Rule maintains validity. Errors in Rule Designer will also reflect any mapping issues.

  • Filter on Mapping Types

    • Fields - Only show Field Mappings

    • Constants - Only show Mappings that use Constants

    • No Mapping - Only show Mappings where the user has chosen not to map.

 

The Fields dialogue shows:

  • Those fields that are required by the right-hand tile on the far left and the Field data type

  • The Mapping Type, Field, Constant or No Mapping.

  • The Tile that originally provided the Field and the Field data type, the Constant text box or a space where no mapping was the decision.

  • Where the fields have been successfully matched to fields flowing into that Tile a tick will show in the data Validity column. These are matched on name without case sensitivity,

  • Fields that did not match but could be mapped will show with a space where the field can be selected, and the Validity column will show a warning icon requesting a Field or constant is mapped or no mapping is selected.

 

Manually Mapping a Field

Most Rules will not run correctly unless the Fields it requires are correctly mapped.

The Validity Filter will show you the fields that are currently not valid. These will be of Field type, will not be populated and a warning icon will show in the Validity column.

To manually map a Field simply click into the Field dropdown which will show you the fields available for mapping. You can scroll through to your chosen field or if you know the field you need type its name and filter down the list. Click on the field you want to select it. If the Field type of the selected field is correct the Field should now show as valid.

 

Constants

You may not want to map a field but you would like to pass through a Constant. This can be especially useful when testing your Rule.

To do this simply change the Mapping Type to Constant. You can now manually add the static value into the Field text box. In the example below “Home Page Test” has been chosen as the value for Category.

The constant values you need to add into field mappings may differ each time you need to add them, but you may have a standard set of values you consistently use. We provide a dropdown that will show the last constant values you have used, so you can simply scroll through and select the one you need.

If the value is a date field a Date helper is available to ensure you create a value with the correct format.

No Mapping

You may have scenarios when a Rule is asking for an optional field and you do not have or need this to be available. You can select “No Mapping” and this will mark the field as completed.

Data Types

We will validate on the choice of field matching to ensure the data types make sense. So for example binary to date would not be allowed.

 

  • Internet address exists within Kettle as a Data Type but is not supported within Rule Designer

  • We allow the mapping of an integer to a string as this scenario will in the majority of cases work correctly. In a small number of cases the mapping will not work so this should be checked during triage if issues arise.

  • The Binary field is not 1 or 0. It accepts any string that will be converted into a binary number.

 

Related content