Recipient().EmployeeNumber

Recipient().EmployeeNumber

The Recipient().EmployeeNumber MetaScript object can be used only if the database family includes Job Manager. If used as the second operand in a condition, recipients will be selected by employee number (the unique number assigned to users in systems that include Job Manager).

Example:

new zEmployeeNumChar - In the above example, zEmployeeNumChar is the first operand and corresponds to a character field created in the database to store the unique employee number assigned to each user defined in the system. Since operands can be based on both new and old values of a field (if the notification routine is defined for an updated record event), and in this example the first operand is based on the new value of the field, the term "new" is prepended to the field name (see screen capture above).

equal - In the above example, the operator equal is used to evaluate the condition. Literally, the value in the zEmployeeNumChar field must be equal to the second operand if the condition is to resolve to True for a selected user. (Only users for whom the condition resolves to True receive a notification.)

=Recipient().EmployeeNumber - In the example above, the second operand of the condition uses the MetaScript object Recipient().EmployeeNumber. Note the use of the "=" sign before Recipient().EmployeeNumber. This is required. By using this MetaScript object, the value in the zEmployeeNumChar field on the record must be equal to the user name of a selected user for him/her to receive a notification. All other selected users are filtered out (do not receive a notification).

Note: Definitions of Operator, Operand, and other technical terms are provided in "Parts of Conditions".

Related Topics

Using the Recipient() MetaScript Object

Recipient().Name

Recipient().FirstName

Recipient().LastName

Recipient().ID

To understand how to define conditions used in , review the sections below.

Note: The concepts in this section are similar for Notifications and Finds. If you have read and understood this information in another part of the guide, you may skip this section.

Parts of Conditions

The condition editor provides the tools necessary to construct logical expressions (also called criteria) that are evaluated by the system to .

Each logical expression used in a condition is composed of the following distinct elements:

The purpose of these elements is to provide the syntax by which one operand is evaluated against another operand. The means by which the operands are evaluated against each other is called the relational operator. For example, in the mathematical expression " 2", the numbers "" and "2" are the operands and the symbol ("") is the relational operator. In Virtual Ticket, the numerical operands of the mathematical expression " 2" are replaced by the contents of database fields, text, and in some cases, MetaScript. In the example above " 2" is replaced by " ". When the above logical expression is evaluated by Virtual Ticket, the value indicated by the database field (first operand) is evaluated against the value indicated by the second operand (the number ) to see if the prior is the latter.

Evaluating Conditions

When evaluated by the system, conditions always evaluate to one of two possible outcomes: True or False. Additional details on constructing conditions for can be found in .

Compound Conditions

Up until this point, our discussion of conditions in Virtual Ticket have used simple examples with each condition composed of one logical expression/criterion. Virtual Ticket provides you with the capability to define compound conditions in your . That is, you can define conditions composed of multiple logical expressions.

Logical expressions in a compound condition are related to each other by one of two boolean operators: AND or OR. When compound conditions are evaluated by the system, the entire compound condition resolves to either True or False. When multiple logical expressions are related to each other by an AND boolean operator, each logical expression in the compound condition must evaluate to True for the entire (compound) condition to evaluate to True. When multiple logical expressions are related to each other by an OR boolean operator, only one of the logical expressions must evaluate to True for the entire compound condition to evaluate to True.

In the case of compound conditions that use both AND and OR boolean operators, an understanding of the system's order of operations is essential to understanding how to define the logical expressions/criteria in your compound conditions and how the system will evaluate them.

Order of Operations

Order of operations refers to the order in which conditions are processed by the system. In the case of compound conditions composed entirely of AND or OR boolean operators, logical statements/criteria in the condition are evaluated sequentially from top to bottom. In the case of compound conditions composed of mixed (AND and OR) boolean operators, the conditions are evaluated a little differently: In Virtual Ticket, the boolean operator AND has a higher priority than OR. For example, the notification condition:

Criterion1

and Criterion2

or Criterion3

will be interpreted by the system as "(Criterion1 AND Criterion2) OR Criterion3. In this example, both Criterion1 and Criterion2 must evaluate to True, or Criterion3 must evaluate to true for the compound condition to evaluate to True.

If you would like the notification condition to be interpreted as "Criterion1 AND (Criterion2 OR Criterion3)", you must define the notification condition as follows:

Criterion1

and Criterion2

or Criterion1

and Criterion3

A notification routine with this send condition will generate a notification only when either Criterion1 and Criterion2 are both true or when Criterion1 and Criterion3 are both true.


Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.