Map rules define how to generate data objects

The object of an output card may be composed of components and partitions. Each object on the output card has a corresponding rule cell, where map rules that transform that data are entered.

A map rule evaluates to a particular data object. The data object is either a group type or an item type. The following rule evaluates to the data object Record, which is a group:

= LOOKUP (Record:Input, Company:Record:Input = "ABC Printing")

A map rule for a data object must evaluate to a data object with the same subclass. Objects with an Item Subclass of Date & Time must evaluate to an object with an Item Subclass of Date & Time.

For example, the output item ShipDate has the Item Subclass of Date & Time. The following map rule is valid when the data object ShipToDate also has an Item Subclass of Date & Time:

ShipDate = ShipToDate:PO:Input

The output CompanyName is defined with an Item Subclass of Text. The following map rule:

CompanyName = "Pop's Pizza Co."

assigns the value of a text literal to the output.

A text literal is text enclosed in double quotes and is interpreted as a text item. A rule that evaluates to something other than text, for example, CompanyName = 24 would be invalid.

To view the type properties of a data object in a card, right-click the type in the input or output card and click Show in Properties on the context menu. If the Properties view is shown, select the map rule to update the Properties view to show the properties of the object.

A map rule on a group type must evaluate to a data object of the same group. For example, the following map rule on the output group Record must evaluate to the group type Record:

Record = LOOKUP (Record:Input, Name:Record:Input = "Kathy")

The map rule is for the group type Record, so it must evaluate to the type Record. The rule shown above does evaluate to Record because the LOOKUP function returns a Record. The rule would be invalid, for example, if it evaluated to the group Invoice.