You are here: Adding Section and Field Rules > Formatting Data > Formatting Data with the = Operator

Formatting Data with the = Operator

You can include an equals sign (=) in the data area of field-level rules, such as Move_It and MoveNum, so those rules can format data returned by the = operation.

The system lets you use the = operator to reference GVM and DAL expressions before it rebuilds XPath search masks.The format is as follows:

=XXX(expression)

where XXX is one of the supported ways of finding data from a symbol, such as DAL or GVM.

This table shows your options:

This usage

Tells the system to

=()

Return the contents of the DAL variable named the same as the root name of the current source name of the current field-level rule.

=("constant")

Return the value of the DAL variable that is named by the string constant.

=GVM(variable)

Return the value of the DAL variable whose name is stored in the specified DAL variable.

=(expression)

Resolve the DAL expression and use the result as the name of a DAL variable to access and return the value

=GVM()

Return the value of the GVM variable named the same as the root name of the current source name of the current field-level rule.

=GVM("constant")

Return the value of the DAL variable that is named by the string constant.

=(variable)

Return the value of the GVM variable specified by the contents of the named DAL variable.

=GVM(expression)

Resolve the DAL expression and then use the result as the name of a GVM variable to access and return the value.

=DAL()

Execute a DAL script named the same as the root name of the current source name of the current field-level rule and return the results.

=DAL("constant")

Execute the DAL script named by the string constant and return the results.

=DAL(variable)

Execute the DAL script named by the contents of the specified DAL variable and then return the results.

=DAL(expression)

Resolve the DAL expression and use the results as the name of a DAL script to execute, and then return the results in XPATH.

Here are some examples:

=(....)

Retrieves the value of a DAL variable specified by a DAL expression

=("ABC")

Returns the contents of the DAL variable ABC.

=(ABC)

Returns the contents of some other DAL variable that is specified by the contents of the DAL variable ABC.

=("A" & "B" & "C")

Returns the same result as the ABC example — the contents of the DAL variable ABC.

=()

This retrieves the contents of a DAL variable that is, by default, the root name of the source name of the current field. For example, assume, the current field has destination name MYFIELD #003 and the source name MYFIELD #003, then...

=()

Means to return the contents of the DAL variable MYFIELD. This is useful because it lets you write general purpose XDB rules.

=DAL(...)

Returns the results returned by DAL script named by the expression. For example, assume a DAL script named ABC.DAL contains:

MYVARIABLE = 100

RETURN(MYVARIABLE)

Then, =DAL(“ABC”) returns 100.

Formatting imported data

The system lets you load data from a standard import file in XML, V2, or DS format. During this process, the system creates a form set and loads the imported data onto the fields on the appropriate forms.

To be able to use the various formatting rules when you have no extract file, include the following rule mask symbolic lookup operators. These operators, which begin with an equals sign (=), provide a way to access the contents of a variable field as if it were found in an extract file. For instance...

This operator

Tells the system to

=@()

Return the contents of the variable field that is the same as the current source field name.

=@(expression)

Evaluate the DAL expression to get the name of the variable field and then get its contents.

Note For more information, see also information about the @ function in the DAL Reference.