Qualifiers are applied to fields stored within the Data Dictionary or special values to return a condition or special value. You apply the value qualifier to the dictionary name of the field. They may be entered as lower or upper case. Some directives may only be used within specific directives. These constraints are listed below in the las column of the table. Valid qualifiers are:
Value Qualifier | Purpose | Used with Directives |
{changed} | This has two possible interpretations, both of which return true or false.
First, this qualifies a change if a field value has been changed when the rule is triggered. For example, if you have a field named MY_FIELD and the user enters or selects a new value for the field, you can then trigger a rule such as: if (MY_FIELD.{changed}) {
ANOTHER_FIELD = 'value'; } The second use is when the Add another button on a repeating row has been pressed, and you want to perform an action on the repeating row that is being added. This is a change action that allows you to manipulate fields, usually to set values in the repeating row being added. An example of this usage, where you have a repeating row named RR_LAYOUT and you want to alter the value of a repeating row field named FIELD_NAME is: if (RR_LAYOUT.{changed} && RR_LAYOUT.{max_row_num} = 3) {
FIELD_NAME[3] = 'value'; } Note that the value of 3 in the above example means to change the values on the 4th row, as the first row is row zero, the second is row one, etc. |
onchange preupdate |
{changed from:value} | This returns true if the last value of the field was 'Value', else it returns false | onchange preupdate |
{changed to:value} | This returns true if the field is changed to the new value 'Value', else it returns false | onchange preupdate |
{company name} | This may only be applied to a field with a display type of user and returns the company name of the user referred to | |
{contains value1[, value2, valuen, ...]} | Used to determine if one or mores values are selected within a multi-valued list | |
{days} | This value qualifier is applied date calculations to determine the number of days between two dates. For example:
X_NUMBER = (X_DATE1 - X_DATE2).{days}; will return the number of days as an integer, between X_DATE1 and X_DATE2 |
|
{excludes value1[, value2, valuen, ...]} | Used to determine if one or more values are not selected within a multi-valued list. This qualifier is only used with multi-valued fields | |
{exists} | This qualifier is only used within a link directive to check whether a value is present or not present | exists |
{is active} | This may only be applied to a field with a display type of user and returns true if the User field references an active user | |
{is external} | This may only be applied to a field with a display type of user and returns true if the User's company name is different from the site company name, as defined by the behavior setting named COMPANY_NAME | |
{is guest} | This may only be applied to a field with a display type of user and returns true if the user’s only role is the role defined by the behavior setting named LIMITED_USER_ROLE | |
{is inactive} | This may only be applied to a field with a display type of user and returns true if the User field references a deactivated user | |
{is internal} | This may only be applied to a field with a display type of user and returns true if the company name of the User field specified matches the site company name defined by the behavior setting named COMPANY_NAME | |
{hours} | This value qualifier is applied date calculations to determine the number of hours between two dates. For example:
X_NUMBER = (X_DATE1 - X_DATE2).{hours}; will return the number of hours as an integer, between X_DATE1 and X_DATE2 |
|
{like:value} | This performs a like comparison on the value of the field providing a return of true or false. Use must use either an asterisk (*) or a question mark (?) as a wild card character in the value that you are evaluating. You may use more than one wildcard character in a single rule. If the string you are searching to match on may be in the middle of a value found, then you should use a wildcard at the beginning as well as at the end of the string. For example {like:nation*} will find the word national but not the word international. However, {like:*nation*} will find both national and international. This value qualifier is case-sensitive | |
{match:value} | This performs an exact match using a regular expression on the value of the field, returning true or false. True is returned only if the entire value of the text matches the value in the rule. This value qualifier is case-sensitive | |
{max_row_num} | This qualifier is used only with repeating row layouts and is used to provide an action on a row. For example, given a repeating row layout named RR_LAYOUT, and wanting to set the value of a field named FIELD_NAME, you can use the construct:
if (RR_LAYOUT.{max_row_num} = 3 && RR_LAYOUT.{changed}) {
FIELD_NAME[3] = 'value'; } This changes the value of the FIELD_NAME on the fourth row of the layout, when that row is added to screen through the use of the Add another button on the repeating row layout. If you reference a row number that does not exist, an error is generated, of the form Repeating row index too large: FIELD_NAME. This indicates that your rule will not ever execute properly, and you must change the rule to avoid the error. If you set the value of a field with such a rule, and any of the preceding repeating rows do not have a value set, then a null value is set into the value of the field on the preceding row. |
onchange preupdate |
{minutes} | This value qualifier is applied date calculations to determine the number of minutes between two dates. For example:
X_NUMBER = (X_DATE1 - X_DATE2).{minutes}; will return the number of minutes as an integer, between X_DATE1 and X_DATE2 |
|
{not null} | This returns true if the field is not null | |
{null} | This is true if the field is null | |
{old value} | This returns the prior value of the field | onchange preupdate |
{owner} | This qualifier is used to determine whether the field referred to has the same value as the value of the built-in OWNER field | |
{seconds} | This value qualifier is applied date calculations to determine the number of seconds between two dates. For example:
X_NUMBER = (X_DATE1 - X_DATE2).{seconds}; will return the number of seconds as an integer, between X_DATE1 and X_DATE2 |
Each field in a user's record has a value qualifier that can be accessed with the syntax USER.{userfield}. For example, if you want to assign the value of a user's company name to the field name COMP_NAME on screen, you would use this:
This is a complete list of the user field qualifiers that may be used.
Value Qualifier | Purpose |
{area} | The user's default Business Area |
{address} {address 1} |
The first line of the user's address |
{address 2} | The second line of the user's address |
{city} | The city within the user's address |
{cell phone} | The user's cell phone number |
{company name} | The user's company name |
{country} | The user's country within their address |
{email} | The user's email address |
{fax} | The user's fax number |
{home phone} | The user's home phone number |
{job title} | The user's job title |
{first name} | The user's first name |
{last name} | The user's last name |
{pager} | The user's pager number |
{project} | The user's default Project within their Business Area |
{state} {province} |
The user's State or Province |
{region} | The user's Region |
{time zone} | The user's time zone |
where nn is a number from 1 to 10. These correspond to the user defined fields within the user's record | |
{work phone} | The user's work phone number |
{zip} {postal code} |
The user's Zip Code or Postal Code |