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 last column of the table.
Value Qualifier | Purpose | Used within 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 |
{clear} | This clears the value in the field | any |
{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 | any |
{contains value1[, value2, valuen, ...]} | Used to determine if one or mores values are selected within a multi-valued list | any |
{default} | This value qualifer is used to set a field to its default value from the data dictionary | any |
{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 | any |
{exists} | This qualifier is only used within a link directive to check whether a value is present or not present | any |
{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 | any |
{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 | any |
{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 | any |
{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 | any |
{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 | any |
{like:value} |
This performs a like comparison on the value of text fields, text area fields and log area fields, 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 must use one or more wildcard characters 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. If you are using the qualifier on a log area display type field, then only the most current entry is used in the comparison. |
any |
{lowercase} | This qualifier returns the value passed to it, after converting the text to lower case. | any |
{match:value} |
This performs an exact match using a regular expression on the value of text fields, text area fields and log area fields, 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.
If you are using the qualifier on a log area display type field, then only the most current entry is used in the comparison. |
any |
{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 |
{not like:value} |
This is used in the same manner as {like:value} but provides the negative result set to {like:value} |
any |
{not null} | This returns true if the field is not null | any |
{null} | This is true if the field is null | any |
{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 | any |
{uppercase} | This qualifier returns the value passed to it, converting all the text to upper case. | any |
These may be used within any directive.
Value Qualifier | Purpose |
{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 |
{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 |
{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 |
{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 |
These may be used within any directive. You may apply the qualifier to fields with a display type of DATE or DAY. In addition you may apply the qualifiers to the values of SYSDAY and SYSDATE .
Value Qualifier | Purpose |
{day} | The day number of the current month |
{day of week} | The day number of the current week |
{day of year} | The day number within the current year |
{hour} | The hour number of the morning or the afternoon |
{hour of day} | The hour of the day |
{minute} | The minute number within the current hour |
{month} | The number of the current month |
{second} | The second number within the current minute |
{week of month} | The week number within the current month |
{week of year} | The week number within the current year |
{year} | The year as a number |
Examples:
Set a text field on an add or an edit screen to the day number within the current month:
MY_TEXTFIELD = SYSDATE.{day};
Within an expression, if a date field shows that it is the 8th day of the month, set a text field to a string:
if (MY_DATEFiELD.{day} = 8) {MY_TEXTFIELD = 'Today is the 8th';}
These may be used within any directive. 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 |
{image} | The user's image or photograph. Note that this can be assigned to an image field within an issue |
{job title} | The user's job title |
{first name} | The user's first name |
{language} | The user's language - this is expressed as the two character abbreviation of the country code |
{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 |
{signature} | The user's signature. Note that this can be assigned to an image field within an issue |
{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 |
The metadata within Document and Image field display types can be accessed with the following qualifiers:
Value Qualifier | Purpose |
{charset} | The character set of the document or image |
{content type} | The content or mime type of the document or image |
{created by user} | The user ID of the person who created the document or image |
{external ident} | A string containing key information to identify the object externally; this is opaque to ExtraView base code. This is not normally used in rules |
{file desc} | The description of the document or image |
{file extension} | The extension of the document or image that was uploaded |
{file format} | The format of the document or image that was uploaded. For example, this may be BINARY or TEXT |
{file name} | The complete filename of the document or image that was uploaded |
{file size} | The size in bytes of the document or image that was uploaded |
{last updated by user} | The user ID of the person who uploaded the document or image |
{mime type} | The mime type of the document or image |
{thumbnail size} | The size in bytes of the thumbnail image of the document or image that was uploaded |
{udf id} | The UDF_ID of the document or image that was uploaded |