This documentation supports the 9.0 version of Remedy Action Request System.

To view the latest version, select the version from the Product version menu.

Checking transaction versus database values

In filter Run If qualifications only (not Set Field or Push Field If qualifications), the qualification can access values for the current record from the current transaction or from the database. This makes it possible for you to check state transitions in filters. For example, you can define a filter that watches for transactions where the status of a request is changed to Closed. It can then check the database to verify that the current status of the request is Fixed, and reject the operation if the status is anything other than Fixed.

You can specify a field reference in the filter qualification in three ways:

  • Transaction Only — References the value of the field in the current transaction only. If the value is not changed in the transaction, it is considered to be $NULL$. If the operation is a delete, it is considered to be $NULL$. To specify a check of the transaction only, use the format 'TR. field' when you enter the field name in the Run If field.
  • Database Only — References the value of the field in the database only. No check is made of the value in the current transaction. If the operation is a create operation, it is considered to be $NULL$. To specify a reference of the database only, use the format 'DB. field' when you enter the field name in the Run If field.
  • Transaction and Database — References the value of the field in the current transaction and uses that value if changed. If not changed in the current transaction, references the value of the field in the database. To specify a reference of both the transaction and the database (in this order), use the format ' field' when you enter the field name in the Run If field.

Filter qualification examples

The procedures in this section outline the steps for creating three example filter qualifications.

Use Case 1-Filter execution based on a changed field value

This use case qualification causes the filter to test whether a value has changed in a field, in this case, the Status field:

'Status' != 'DB.Status'

Follow the steps given below to enter this qualification using the Expression Editor:

  1. In the filter editor, click the ellipsis button on the Run If Qualification panel.
  2. In the Expression Editor, select Status from the Available Fields list and then click Add Field:

    'Status'
  3. Click the not equal (!=) operator to add it to the end of the expression:

    'Status' !=
  4. Position the cursor at the end of the line, and then type 'DB.(including the period):

    'Status' != 'DB.

    Content assist presents the list of available fields, prefixed with 'DB.

  5. Double-click 'DB.Status'to select it from the list:

    'Status' != 'DB.Status'
  6. Click OK to save the qualification.

Use Case 2-Filter execution based on transaction status

This use case qualification causes the filter to execute when the status of the transaction is set to Fixed or Closed:

'TR.Status' = "Fixed" OR 'TR.Status' = "Closed"

The TR. syntax causes the filter to use the value from the current transaction, rather than the database value.
Follow the steps given below to enter this qualification using the Expression Editor:

  1. In the filter editor, click the ellipsis button on the Run If Qualification panel.
  2. In the Expression Editor, select Status from the Available Fields list, and then click Add Field.
  3. In the expression editing area, insert TR.after the first quotation mark:

    'TR.Status'
  4. Click the equal sign (=) operator to add it to the end of the expression:

    'TR.Status' =
  5. Type Fixedenclosed in double quotation marks:

    'TR.Status' = "Fixed"
  6. Click the ORoperator:

    'TR.Status' = "Fixed" OR
  7. Repeat steps 2 through 4.
    The Run If field now contains:

    'TR.Status' = "Fixed" OR 'TR.Status' =
  8. Type Closedenclosed in double quotation marks to complete the qualification:

    'TR.Status' = "Fixed" OR 'TR.Status' = "Closed"
  9. Click OKto save the qualification.

    Tip

    To manually type the expression, start by typing a single quote. BMC Remedy Developer Studio pops up a list of available fields. You can also type 'TR, and then select from the list of available fields. If you enter an expression by hand, make sure to use correct spelling, punctuation, keywords, and quotations.

Use Case 3-Filter execution based on elapsed time

This use case qualification causes the filter to act on requests that are older than 10 hours:

'Status History.New.TIME' < $TIMESTAMP$ - (60 * 60 * 10)

The qualification searches for requests where the time that the request was created is less than the current time minus 10 hours. This example uses a status history reference as one of its values.
Follow the steps given below to enter this qualification using the Expression Editor:

  1. In the filter editor, click the ellipsis button on the Run If Qualification panel.
  2. In the Expression Editor, select Status History.New.TIME from the Available Fields list, and then click Add Field:

    'Status History.New.TIME'

    In this case, New is the Status value that you want to match and TIME is the keyword for the time that the request was entered.

  3. Click the less than (<) operator to add it to the end of the expression:

    'Status History.New.TIME' <
  4. Expand the Keywords list, select $TIMESTAMP$, and then click Add Keyword:

    'Status History.New.TIME' < $TIMESTAMP$
  5. Click the minus sign (-) operator:

    'Status History.New.TIME' < $TIMESTAMP$ -
  6. Enter an hour value, for example (60 * 60 * 10):

    'Status History.New.TIME' < $TIMESTAMP$ - (60 * 60 * 10)

    See Tips for entering dates and times for holidays for information about entering time values.

  7. Click OK to save the qualification.
Was this page helpful? Yes No Submitting... Thank you

Comments