EXTERNAL Operator

Version 1
    Share This:

    This week's theme:  Cool Tech Tips
    This week's topic was recommended by a member of the AR System Developer Community.

     

    EXTERNAL Operator
    Part 1

    Have you ever wanted to dynamically change the qualification of a table field at execution time?  Wouldn't it be valuable to have a way to vary the search criteria used for a Set Fields operation?  The EXTERNAL operator provides you with a way to do this, and since it's supported anywhere a qualification can be specified, you now have more flexibility than ever over how your workflow can behave.  This article will explain how AR System® handles the EXTERNAL operator and what you need to do in order to take advantage of it.

     

    Defining the EXTERNAL Operator

    You can use the EXTERNAL operator to specify that you want to obtain the qualification, or a part of the qualification, from a field value.  Then, at execution time, you can populate this field value by dynamically constructing a qualification.  An end user could enter this value, but more commonly, you would use a Set Fields action to do it.

    Following are a few examples that demonstrate how you can use this operator when defining qualifications in Remedy Administrator.  In each case, the field value passed to the EXTERNAL operator will be used to supply a qualification at execution time.

    • You can use the EXTERNAL operator to provide the entire qualification using a single field value.

    EXTERNAL($fieldName$)

    • Or, your qualification can consist of both an EXTERNAL operator and other data.

    EXTERNAL($fieldName$) AND ($Submitter$ = 'Submitter')

     

    Rules for Using the EXTERNAL Operator

    When using the EXTERNAL operator, there are some basic rules to keep in mind.  It is important to remember that the qualification you are providing at execution time should use the same syntax as that which you would specify at design time in Remedy Administrator.

    Following are some tips to help you: 

    • The qualification must use field names not field labels.
    • A Run If condition must enclose current screen fields with single quotes.
    • A qualification that executes against the database must enclose current screen fields with dollar signs ($) and database fields with single quotes (').
    • If you would like to specify a keyword in a qualification, you must escape the keyword with the backslash (\) character.  This will guarantee that the keyword is resolved after the qualification is parsed, but before the qualification is evaluated. For example:

    'Submitter' = $\USER$

    If you want to use a Set Fields action to populate the field value, you should keep in mind that some special rules apply: 

    1. If you want to include double quotes (") inside the field assignment value, you must "double" them up.
    • Setting a value of "'Submitter' = ""Demo""" will place the value 'Submitter' = "Demo" in the field being assigned the value.
    • The entire string is enclosed by double quotes, as you would do with a regular character string assignment, but the double quotes surrounding the value Demo are "doubled up" so that the correct syntax is maintained after the field assignment.
    1. The use of double quotes within the field assignment value also plays a role in whether or not current screen field references will be translated to values when the set fields action executes.
    • Setting a value of "'Submitter' = """ + $Submitter$ +  """" will place the value of 'Submitter' = "Mary Manager" in the field being assigned the value.

      Note
      :  $Submitter$ was translated from the field reference to the current screen value of the Submitter field because $Submitter$ was not enclosed in double quotes.

      This rule applies to all qualifications.
    • Setting a value of "'Submitter' = $Submitter$" will place the value of 'Submitter' = $Submitter$ in the field being assigned the value.

      Note
      :  $Submitter$ was not translated from the field reference to the current screen value of the Submitter field.  It is taken as a literal string since it was enclosed by double quotes.

      This rule applies to all qualifications except the table field qualification.

    This week we defined the EXTERNAL operator and provided you with some rules for using it.  Next week we'll delve into what happens at execution time and provide you with some advanced topics.

    ~Karen
    Senior Software Engineer, Remedy Engineering
    Joined Remedy in April 1998, focusing on Remedy native client development
    ""It is amazing what you can accomplish if you do not care who gets the credit." Harry S Truman


    Related Document
    EXTERNAL Operator part 2