Syntax for Default Values and Validation Rules

This topic describes the syntax to configure the default values and validation rules.

Naming of entities: Use these names to relate custom properties and product fields to required entities:
  • activity - prefix for activity properties/fields. Example: activity.PROP_A1

  • inventory - prefix for inventory properties/fields. Example: inventory.PROP_I1

  • resource - prefix for resource properties/fields. Example: resource.PROP_R1

  • user - prefix for user properties/fields. Example: user.PROP_U1

  • request - prefix for service request properties/fields. Example: sr.PROP_SR1

Operators: All operators are case sensitive and must be used in the configuration as described in the "Language expression" section. Examples:
  • activity.PROP_A1 = 100 OR activity.PROP_A1 = 200 - is correct

  • activity.PROP_A1 = 100 or activity.PROP_A1 = 200 - is incorrect

Numbers and Strings: String-type values must be used in expressions in double or single quotes. For example:
  • "string expression"

  • "12345"

  • 'single'

Escape sequences: The allowed string escape sequences are:
  • \' – To escape ‘ within single quoted string

  • \" – To escape “ within double quoted string

  • \\ – To escape the backslash

  • \n – To add line breaks between string

  • \t – To add tab space

These escape sequences work with multiline properties only.

To ignore other escape sequences:
  • \radasd => radasd

  • \x123 => x123

To use integers in expressions, use them without of quotes. For example:
  • 12345

  • 6

Use float numbers with a dot as delimiter and without quotes. For example: 2.86954.

Properties and Fields

For properties and fields, the entity is given first followed by the label, and separated by a dot. If the label contains anything other than a to z, A to Z, 0 to 9, or underscore, wrap it with backticks. Examples:
  • activity.PROP_A1 = 25

  • activity.PROP_A1 <> activity.PROP_A2

  • inventory.`LABEL WITH SPACE`