Element mapping based on data criteria

Inbound conditional mapping at the element level can also be based on the evaluation of data criteria you create and attach to an element as a condition or conditions. The program evaluates the condition or conditions and maps the data if they are true.

If/then and AND conditions

You may create up to two conditions. If you define one condition, the condition is applied as an “if ... then”. If you create two conditions, they will be applied as an AND condition (“if ... AND if… then”). Both conditions must be true for the mapping to occur.

OR conditions

You can create an OR condition by duplicating the element and modifying the condition. You can duplicate the element by highlighting it and selecting Copy or Copy With Data from the Element menu on the Mapping window. Duplicate the element and modify its conditions as many times as you have possible destinations and/or conditions for this element.

NoteRefer to Chapter 3, “Working with Maps” for more detailed instructions on copying elements.

StepsSetting up conditions

Use the following procedure to set up the condition or conditions that will determine whether the element will be mapped.

  1. Map the element to the destination application field. Then, right-click the element and select Condition from the submenu.

    The Element Conditions window displays, automatically populated with the identifier and description of the element whose mapping depends on the condition or conditions you specified.

    Under Options, you may set up one or two conditions – Condition 1 and Condition 2.

  2. Click the top up arrow to choose the data to be evaluated in the condition.

    If you choose Record/Field, the Records/Tables window displays.

  3. Double-click a record/field to select it, and the program automatically enters the record and field names into the top two text boxes.

    If you choose Memory Variable, the Memory Variables window displays.

  4. Double-click a memory variable to select it, and the program automatically enters MEMVAR into the top text box and the name of the memory variable into the next text box.

    If one or more of the conditions depend on the value of data in another element, you must make that other element a conditional variable. A conditional variable is a special type of memory variable that is used in conditional mapping. When you specify an element as a conditional variable, ECMap creates a special memory variable field name of XXXNNSS, where XXX is the current Segment ID, NN is a sequence number that gives the position of the element in the segment, and SS is the sub-element. ECMap first checks for the existence of the variable name and then creates it if it does not already exist. All field names are case sensitive; a lower case beg01 is not the same variable as an upper case BEG01.

  5. To conditionalize an element variable, on the Mapping window, right-click the element containing the data that will be evaluated and select Conditional Variable from the submenu.

    You see the results of your selection in all three sections of the Mapping window. In the Mapping section at the bottom of the window on the line containing the element you selected, CNDVAR displays under Record and the name of the conditional variable under Field Name. If you double-click the element in the standards section of the window, you see a mapping icon and the name of the conditional variable that was created. The memory variable created appears in the Destination: Memory Variable pane of the Mapping window.

    Clear Condition 1 (or 2) lets you remove information entered in a condition.

  6. Click the middle up arrow and choose an operator from the drop-down list. The program will insert the operator you select into the middle text box. The choices are:

  7. Click the bottom up arrow to choose the value against which the data in the condition will be evaluated.

    If you choose Record/Field, the Record/Tables window displays.

  8. Double-click a record/field to select it, and the program automatically enters the names of the record and field into the top bottom text boxes.

    If you choose Memory Variable, the Memory Variables window displays.

  9. Double-click a memory variable to select it, and the program automatically enters MEMVAR into the first bottom text box and the name of the memory variable into the next text box.

    If you choose Constant, the Constant window displays.

  10. Enter a constant value and select OK. The program enters STRVAR and the constant value into the bottom two text boxes.

  11. Select OK again to return to the Mapping window