rrCompare

Compares the values of two variables and returns True if they are the same.

Syntax

bool rrCompare (string object1, string object2)

Parameters

Two Smart Parameters.
  1. A value or a smart parameter, which is a reference to a value.
  2. A value or a smart parameter, which is a reference to a value for comparison.
Note: Either reference can specify a variable of the calling object (the bound object of the Document Hierarchy.) Alternatively, both references can identify a variable of an object that is a parent or child of the calling object.

Either parameter is optional. If a parameter is not specified, it will default to the calling object. If the calling object is a field, it will use the field value. For batch, document and page objects, it will use a variable called Text, creating the variable if it does not exist.

Returns

False if the compared values do not match. Otherwise, True.

Level

All.

Details

Uses the Smart Parameters that you enter as the parameter to locate and compare the values of two object's variables.
Example
Code Comment
rrCompare("Expected_Pages","@B.Tot_Pages") Solicits a value from the field Expected_Pages of the calling object and compares it to the value of the field @B.Tot_Pages of the Batch object. The action returns False if the values are not the same.
rrCompare("Expected Value","@F\MyFieldToTest") Checks the value of the field MyFieldToTest.
rrCompare("MyExpectedName", "@TASKNAME") Checks the current task name.
rrCompare("@EMPTY", "@F\MyFieldToTest") Checks whether the field MyFieldToTest contains an empty string.
rrCompare("MyExpectedName", "@JOBNAME") Checks the current job name.