This documentation supports the 21.3 version of Action Request System.

To view an earlier version, select the version from the Product version menu.

Operators

This section describes how each operator is evaluated when you use multiple operators in a qualification. You can use operators to build logical expressions. For additional information, see Using buttons and menu bar items to execute active links.

Operator types

The following table lists the operators that you can use when building a qualification.

OperatorAction

AND (&&)

Logical AND of the result of two conditions. (The result is true if both conditions are true.) For example, 'Status'="New" AND 'Assigned-to'="Andy" finds all new requests assigned to Andy. You can use the symbol && instead of the word AND.

OR (||)

Logical OR of the result of two conditions. (The result is true if either condition is true.) For example, 'Status'="New" OR 'Assigned To'="Andy" finds all new requests and all requests assigned to Andy (no matter what their status). You can use the symbol || (two vertical lines) instead of the word OR.

NOT (!)

Negates the condition that follows. (If the condition is false, the result is true.) For example, NOT 'Status'="New" finds all requests that are not new. You can use the symbol ! instead of the word NOT.

LIKE

Performs a pattern search using wildcard characters, including %-[ ][-], and [^]. For example, 'Submitter' LIKE "Bob%ton" finds all requests with a submitter name that begins with the letters "Bob" and ends with the letters "ton"--such as Bob Compton and Bobby Fenton. See Wildcards. The LIKE operator applies to character and diary fields only. LIKE with comma separators can be used as the accrue operator in full text searches. For more information about full text search, see Enabling and disabling full text search.

Some databases do not support all the possible wildcard matching characters. To determine whether there are restrictions on the wildcard characters that you can use in SQL queries, check your database documentation.

EXTERNAL()

Enables all or part of a qualification to come from a field on the form. Used in qualifications for active link or filter Run If conditions, Push Fields or Set Fields actions, table field properties, and Search type menu definitions. EXTERNAL() is not used in escalations and flashboard variable qualifications. Enter a character field name or field ID into the EXTERNAL() operator, for example, EXTERNAL($field_name$) or EXTERNAL('50')EXTERNAL() evaluates to True when:

  • The field specified contains an expression that evaluates to True.
  • The field is empty.
  • The field does not exist or is not a character field. You can also concatenate expressions. For example:

    EXTERNAL($field_name$) AND 'Submitter' != $NULL$

If the qualification in a field called by EXTERNAL() includes keywords, you must add an escape character () to the keywords. This prevents the keywords from expanding before being used in the qualification. For example, if you have a table field with a qualification of EXTERNAL($Qualify Field$), and and Qualify Field is a character field with a value of:

('Create Date' < $TIMESTAMP$) AND ('Login Name' = $USER$)

Then, the table field does not produce the expected results when refreshed. Instead, the keywords expand, producing a qualification such as:

('Create Date' < 05/22/02 11:00:34 AM) AND ('Login Name' = Demo)

This is an invalid query because the date/time and character values are not enclosed in quotation marks. To prevent the keywords from expanding, write the qualification like this:

('Create Date' < $\TIMESTAMP$) AND ('Login Name' = $\USER$)

In forms viewed in the web client, if EXTERNAL() references a field that contains a qualification such as $Date 1$ <= 'Date 2', you must add double quotation marks around $Date 1$:

"$Date 1$" <= 'Date 2'

If EXTERNAL() references a field whose value is set by a Set Fields or Push Fields action, use four double quotation marks to create a single double quotation mark. For example, to set the field's value to:

'Create Date'>="10\31\05" AND 'OtherField'="Hello"

Set it as follows in the Set Fields or Push Fields action:

"'Create Date'>=" + """" + "10\31\05" + """"+ " AND 'OtherField'=" + """"+ "Hello" + """"

In the web client, the EXTERNAL operator reads the date and time string from client's time zone. For more information, see Case sensitivity and using quotation marks section in the topic Process command syntax.

+

Adds two integer, real, or decimal values. Adds an integer, real, or decimal interval to a time value. (Real and decimal values are truncated to an integer value.) Concatenates two character strings. For example, 'Create Date'>$DATE$+28800 finds all requests created after 8:00 a.m. today (where 28800 is the number of seconds in 8 hours).

-

Performs any of the following calculations:

  • Subtracts two integer, real, or decimal values.
  • Subtracts two time values (resulting in an integer).
  • Subtracts an integer, real, or decimal interval from a time value. (Real and decimal values are truncated to an integer value.)

For example, 'Create Date'>$DATE$-604800 finds all requests created within the last seven days (where 604800 is the number of seconds in one week).

*

Multiplies two integer, real, or decimal values. For example, 'Quantity' * 'Price'>50 finds all requests where the contents of the Quantity field multiplied by the contents of the Price field is more than 50.

/

Divides two integer, real, or decimal values. For example, 'Yearly Expenses'/12>8000 finds all requests where the average monthly expense is greater than $8,000.

%

Supplies the modulo of two integer values (the remainder of a division of the values). For example, 'Group ID'%2=1 finds all requests with an odd number in their Group ID field.

Use the modulo operator only with integer fields. If you use this operator with fields that have other data types, such as Date/Time, an error occurs.

<

Matches contents that are less than the value. For example, 'Create Date'<($TIMESTAMP$-86400) finds all requests created more than 24 hours ago (where 86400 is the number of seconds in 24 hours).

>

Matches contents that are greater than the value. For example, 'Create Date'>"10/31/05 00:00:00" finds all requests created after midnight on October 31, 2005.

!=

Matches contents that are not equal to the value. For example, 'Status'!="Closed" finds all requests that are not closed.

If possible, avoid using the != operator when building qualifications. For more information, see Creating efficient qualifications. On Sybase databases, you cannot use the != operator against unlimited character fields where the database input length equals 0.

<=

Matches contents that are less than or equal to the value. For example, 'Salary'<=10000 finds all requests with contents of the Salary field less than or equal to 10000.

>=

Matches contents that are greater than or equal to the value. For example, 'Create Date'>="10/31/05" finds all requests created on or after October 31, 2005.

+

Matches contents that are exactly equal to the value. For example, 'Status'=0 finds all requests with a status value equal to the first selection value.

Operator precedence

When you use multiple operators to construct qualification criteria, they are evaluated in the following order:

  1. ( )
  2. NOT (!) - (unary minus; an operator that takes only one operand; for example, -2.5)
  3. ** / %*
  4. + -
  5. < <- > >- - !- LIKE
  6. AND (&&)
  7. OR (||)

Operators of the same precedence are performed left to right.

You can use parentheses in an expression to override operator precedence. AR System  evaluates expressions inside parentheses first before evaluating those outside.

Was this page helpful? Yes No Submitting... Thank you

Comments