Please enable JavaScript to view this site.

Altova MapForce 2020 Enterprise Edition

In a previous topic, Adapting Code Values from External Sources, you have seen how to configure field validation through custom code lists globally (it applies for any message that may be using a particular field). In the event that you need validation to apply only to a specific message, it is possible to add custom code lists inline (locally for a particular message). When you need to do this, follow the steps below:


1.Open in an XML editor the {Message}.config file corresponding to the message of interest. The {Message}.config file can be found in the C:\Program Files\Altova\MapForce2020\MapForceEDI\ directory, in the subdirectory corresponding to the name of the required EDI flavour.

2.Find the <Data> element under the required <Segment>, and add the custom code values as children of <Values>, for example:

<Group name="Message_270-B1" info="Health Care Eligibility Benefit Inquiry" maxOccurs="unbounded">
    <Segment name="ST" info="Transaction Set Header">
      <Condition path="F1705" value="005010X279A1" />
      <Data ref="F143" info="Transaction Set Identifier Code">
          <Value Code="270" />


[>>>> custom values can be added here...]

      <Data ref="F329" info="Transaction Set Control Number" />
      <Data ref="F1705" info="Implementation Convention Reference" />


Note the following:


You must have write permissions to the C:\Program Files\Altova\MapForce2020\MapForceEDI directory in order to modify its contents.

When a field has both locally-defined values (such as those in the code listing above) and globally-defined code values (in a .codelist file, as shown in Adapting Code Values from External Sources), then make sure that local code values are also defined as global code values. Otherwise, a validation error*** will be raised: {Value} is not a legal value for field {Field}.

Inline (local) validation can be used if you require validation at field level (that is, the possible values that a field can take can be expressed as a list). Inline validation cannot be used for those fields that require complex validation rules at character level. When the field needs complex validation rules at character level (such as those defined in ISO 6346 applicable to Data Element 8155 of the UN/EDIFACT standard), add the code values globally, as shown in Adapting Code Values from External Sources. You can then configure validation as shown in Configuring Character-Level Validation.


*** Note that the actual validation outcome takes into account the settings configured for the rule "Invalid code list value" in the EDI Validation Settings dialog box. (To open this dialog box, click the Validation button on the EDI Component Settings dialog box).

© 2020 Altova GmbH