Using fields in qualifications
This topic describes the formatting conventions for fields used in a Run If qualification or expression. In this topic:
- Single quotation marks
- Double quotation marks
- Using currency fields
- Using attachment fields
- Using selection field values
- Field values and filters
- Field ID 112 and dynamic group fields
- Field names containing special characters
Single quotation marks
Enclose field names or field IDs in single quotation marks, for example, 'Short Description' or '7'. Single quotation marks are automatically added when you select fields from the Available Fields list in the Expression Editor.
If the field name includes a single quotation mark, enter two single quotation marks in its place. For example, if the field name is Doug's Requests, enter it as 'Doug''s Requests'.
Double quotation marks
Some values must be enclosed in double quotation marks (") in a qualification. The following table outlines when to use double quotation marks.
Using double quotation marks
Use Quotation Marks?
Nonnumeric, such as time, character, and diary
Enclose a date in double quotations:"04/01/04"
Nonnumeric that include quotation marks
In addition to the double quotes contained in the value, include double quotes around the full entry. For example, if you want to search for a string such as:Robert "Bobby" Smith
Integers (for time fields)
Integers without quotes are interpreted as a number of seconds. To specify a number of hours, multiply 60 (= 1 minute) by 60 (= 1 hour). For example, to specify 10 hours, enter:60 * 60 * 10
Enter keywords with dollar signs ($) as shown in this example:'Submitter' = $USER$
Using currency fields
For currency fields, you must have one of t he following enclosed within single quotation marks:
- The name or Field ID of the currency field, for example:
'<currencyField>' = $NULL$
- The name of the currency field, followed by a period and a specific portion of the currency field's value, such as the date or a functional currency value, for example:
If the qualification for the currency field includes a calculation, you must include the currency type to avoid an error. For example, if you have a field called "Tax Savings" that displays the percentage of tax savings of a field that calculates the difference of two billing fields, determine the percentage by using a qualification like this:
'<currencyField.VALUE>' < 5000
If you use field references in the calculation, you do not need to supply the currency type; it is determined at run time. For example:
($Billing Totals Difference.VALUE$ * $Current Tax Rate$) / ("100" + $Billing Assessment Total Difference.TYPE$)
($Billing Totals Difference.VALUE$ * $Current Tax Rate$) / $Integer field that stores the division number$
Using attachment fields
The value of an attachment field used in a qualification is a character string containing the fully qualified file name of the attachment file.
Using selection field values
Selection field values can be specified as text values (in quotation marks) or numeric values or IDs (not in quotation marks). For example, if you have a Status field with the option buttons labeled Open, Fixed, and Verified, you can enter either "Open" or 0 to specify the value of Open, because Open is the first selection value in the selection field. For example:
Field values and filters
For filters, you can specify whether the qualification should reference field values in the transaction only, in the database only, or in both. See Checking transaction versus database values.
Field ID 112 and dynamic group fields
If referencing field ID 112 (for assignee group access) or dynamic group fields, enclose the name of the field in single quotation marks. Enclose the value statement in double quotes. The value statement can contain a group ID, group name, role ID, role name, or user name, and each value must be followed by a semicolon within the quotes. For example, if the name of field 112 is Assignee Group and the group ID of Sales Staff is 50, enter the qualification as follows:
'Assignee Group' = "50;"
For user Mary Manager, use single quotation marks:
'Assignee Group' = "'Mary Manager';"
To enter multiple groups, roles, and user names in your qualification, enter a semicolon at the beginning of the list and include no spaces. For example, the name of field 112 is Assignee Group. To create a qualification that includes the Sales Staff group (ID 50), the Marketing Staff group (ID 51), the Managers role (ID -90), and user Mary Manager, enter the qualification using the following format:
'Assignee Group' = ";50;51;-90;'Mary Manager';"
To use multiple groups for field ID 112 and for dynamic group fields, select Enable Multiple Assign Groups on the Configuration tab of the AR System Administration: Server Information form. See Setting administrative options.
Field names containing special characters
If the field name contains the character that it will be delimited with in the expression, you must double that character in the field name within the expression.
For example, when the delimiter is single quotation marks:
- For field'Name use ' field' 'Name'
- For field$Name use ' field$Name'
- For 'fieldName use ' ''fieldName '
When the delimiter is dollar signs:
- For field$Name use $field$ $Name$
- For field'Name use $field'Name$
- For $fieldName use $$$fieldName$
In BMC Remedy Developer Studio, the auto-complete feature and the field selector dialog box manage this syntax convention for you.