Adding Criteria to a Rule

Once Rule options are defined and Variables are added for a Rule Usage of Rule, you can add Criteria to identify data from the chosen Base Entity. In the example being followed in this documentation, you want to add all criteria needed to identify and select the correct APT instance record for a particular student.

Note:

If you are creating a Rule with a Rule Usage of Function, there is no option to add Criteria. For more information, see Understanding Contextual Referencing.

To add Criteria, expand the Criteria group box by clicking the arrow to the left of Criteria in the group box header.

This example illustrates the fields and controls on the Criteria Grid – Initial Row. You can find definitions for the fields and controls later on this page.

Criteria Grid – Initial Row

Then, click the Search icon to the right of the Label field to open the Prompt for page where you can select an Entity Property.

This example illustrates the fields and controls on the Prompt for page. You can find definitions for the fields and controls later on this page.

Prompt for page

Click the Academic Institution link to select it as a Property. The Prompt for page closes, and you return to the Criteria grid with the Label column in the first row populated with Academic Institution. The Operator you want to use is = and the Variable Type you want to use is Variable, both of are already populated by default in this case. Since Type Variable is selected, the Search icon appears to the right of the Object field.

This example illustrates the fields and controls on the Example of Criteria Grid – Label Populated. You can find definitions for the fields and controls later on this page.

Example of Criteria Grid – Label Populated

Click the Search icon to the right of the Object field to open the Add/Select Variable page.

This example illustrates the fields and controls on the Add/Select a Variable page. You can find definitions for the fields and controls later on this page.

Add/Select a Variable page

Select the check box next to the Variable you want to add, and click the Add button.

Once you've selected all the Criteria you want to add, the Criteria grid looks something like this:

This example illustrates the fields and controls on the Example of Criteria Grid. You can find definitions for the fields and controls later on this page.

Example of Criteria Grid

In this example, there is an assumption that a batch process is responsible for supplying the correct Variables to our Rule. This is why the Variables selected for the Criteria grid are Input Variables.

Here is more information about fields in the Criteria grid:

Field or Control Description

Label

Displays the name of the Property. Clicking the Search icon to the right of the Label field opens the Prompt for page where you can select from a list of properties from the Base Entity that is added in field Entity Name on the Rule Definition page.

Connectors and Parentheses

In the left-most columns of the Criteria grid are the AND/OR connectors and parenthesis. Select these to create complex (nested) Select Criteria.

This example illustrates the fields and controls on the Example of Connectors and Parentheses. You can find definitions for the fields and controls later on this page.

Example of Connectors and Parentheses
Field or Control Description

Operator

Select an Operator to relate the Property Label to the Type/Variable. The Operator is a symbol or function used to express a mathematical function or logical action. The following Operators can be used when adding a Criteria line:

  • < (less than)

  • <= (less than or equal to)

  • <> (not equal to)

  • = (equal to)

  • > (greater than)

  • >= (greater than or equal to)

  • Exists and Not Exists – The Exists and Not Exists operators can be used in combination with Types Text, Variable, Numbers, Date, Datetime, and Time. When using these Operators, an argument only exists on the left side of the operator, the Label. These Operators work differently based on the Object type:

    • If the Object is a string, Exists is true if Argument 1 is a non-blank value.

    • If the Object type is a number, Exists is true then whenever a value greater than 0 is found.

    • If the Object type is a date, time or date time, Exists is true if the value is anything other than null.

    • If the Object type is Boolean, the operator always returns True since true and false are both valid values.

  • In and Not In – The In and Not In operators can only be used in combination with Type of Variable. The Variable in question needs to be a Variable of type List.

  • Like and Not Like – The Like and Not Like operators can be used in combination with Type Text and Variable. Numeric values in string fields can also be evaluated:

    • “%” (percent sign) – Use at the beginning or end of string to replace any length value in the comparison.

    • “_” (underscore) – Use to replace a single alphabetic value in the comparison.

    • “#” (hash or pound sign) – Use to replace a single numeric value in the comparison.

  • AsOfDate – This operator automatically performs Effective Date selection as per standard Effective Dated processing. The AsOfdate operator is only available when the Base Entity has an Effective Date Key field.

  • FirstSeq and LastSeq – These operators allow you to select a minimum or maximum effective sequence for those Entities that have an effective sequence Key field. The LastSeq and FirstSeq are only available on Base Entities with key field Effective Sequence.

Type

Select the Type of Object Property to be compared to the Label Property. The chosen Operator controls what Types are available.

For the Operators Exists and Not Exists, no Type can be chosen.

For the Operators In and Not In, only Variables of Type List can be chosen.

Here are the available types:

  • Date

  • Datetime

  • Number

  • Property

  • Text

  • Time

  • True/False

  • Variable

Object

The Object field behaves differently depending on which Type or Operator is chosen.

The Object field is an open edit field except in the following cases:

  • The Object field is not available when the Operator is Exists or Not Exists.

  • The Object field changes to a prompt when the Type is Variable, True/False, Property, or when LOV prompting has been enabled for properties.

    For more information, see the Defining Lists of Values for Rules Engine Variables section.

Help

Hover your cursor over the Help icon (question mark) to open a popup window for information on how to use the selected Type and/or Operator.

Here are possible options for Types and Objects in the Criteria grid:

Label Operator Type Object

Numeric Property

=

<>

>

>=

<

<=

Variable

or

Number

Open field

or

Prompts on Number Variables.

String Property

=

<>

>

>=

<

<=

Variable

or

Text

Open field

or

Prompts on Text Variables.

Date(time) Property

=

<>

>

>=

<

<=

Variable

or

Date(time)

Open field

or

Prompts on Date(time) Variables.

Date Property and field name is Effective Date

Asofdate

Variable

Variable

Special handling exists for selection of Effective Date. For Entities with an Effective Date, you can choose to have the system automatically select the maximum Effective Date.

Number Property and field name is Effective Sequence

FirstSeq

LastSeq

No value available

Special handling exists for selection of Effective sequence. For entities with an effective sequence the user can choose to have the system automatically select the maximum or minimum effective sequence.

Can be used in combination with the Asofdate option.

List Property

In

Not In

Variable

List Variable which matches property Type

Text Property

Like

Not like

Variable

Text

Open field

or

Text Variable

Property of any type

Exists

Not exists

No value available

<no value>

If the Property is a Date or Date(time), any value not equal to Null exists.

If the Property is a Number, any number unequal to 0 (zero) exists.

If the Property is a String, any value unequal to space (blank) exists.