rrSet (deprecated)

Assigns a value to a variable or field. This action has been deprecated and is scheduled to be removed in a future release. It is recommended that you no longer use this action. Instead, use the rrSet action in the RuleRunnerLogic action library.

Syntax

bool rrSet (string varSource, string varTarget)

Parameters

Smart parameters are supported.
Both parameters for this action are optional. If you do not specify a parameter, the default item that the parameter references depends on the calling object type as shown in the following table:
Calling object type Default item referenced
Field The field that is the calling object
Page, Document, or Batch The variable Text of the calling object. This variable is created if it does not exist.
varSource
The item whose value is to be copied to the target item.
varTarget
The item that is to receive the copied value.

Returns

False if the action cannot locate the target object. Otherwise, this action returns True.

Level

All.

Details

Use this action to copy the value of a source item to a target item.

To copy a field's value, confidence, and image references (field positions) of the source field object, use rrCopy.

Example
In these examples, the target item’s value is set to be the same as the source item's value.
Code Source Target
rrSet("@P\Date","@F") The field Date that is a sibling of the target field. Current field
rrSet("@P.FieldCount","@F") Page variable FieldCount Current field
rrSet("@F","@P.Variable") Current field Current page variable Variable
rrSet("@F","@F.Variable") Current field Current field variable Variable
rrSet("@P.TemplateID","@P\FieldName") Variable TemplateID The field DCO object FieldName
rrSet("@F.MySourceVar","@P.MyTargetVar") The calling field MySourceVar variable The MyTargetVar variable that belongs to the parent page of the calling object
rrSet("@D.Tot_Pages","@B.Tot_Pages") The calling document's Tot_Pages variable.

This example assumes that the calling object is a child of a Document object.

The Tot_Pages variable of the Batch object
rrSet("@DICT_VALUE(..\MONTH)","") The OMR recognized value of the MONTH field as translated by the smart parameter to the text from a predefined dictionary The calling object's Text property if the calling object is a field, or the Text variable if the calling object is not a field