Skip to main content

How to define a cross reference table or codelist in XML to X12  mapping?

 

Collect = CC

Prepaid = PP

Per Contract = DE

This is something that you would want to address in a previous step in the flow, prior to generating the XML for the X12 connector to translate. There are multiple ways to approach this, but in general, I would recommend that you do one of the following:

 

  1. Use a set of conditionals in the XML Map to map alternate conditions to the same element (use for small numbers of values)

Conditionals

To do this, you’ll want to create multiple nodes in your XML file that are mapped to the same value, but have alternate conditionals applied:

For each conditional, use a different value in the condition, and hard code the expression:

 

  1. Use the Custom Script to create a select/case statement for that node for a larger finite list using the arc:select and arc:case keywords. Whatever is set in result.text before the code block exists will be the result:

arc:select

arc:case

If you have a larger list to sort through, you can use the 

  1. Use the Lookup Action of a corresponding database connection to look up the value from a table where those values are stored (for large lists or ones that require dynamic updates)

Lookup

 

This would be used as a separate processing step in your flow instead of being used within XML Map, but for queries that would return a single value (which can be repeated if there are multiple matching XPaths for the lookup), this will amend the XML to include a new node in the output, which you can map against directly in the XML Map step

 

 


Reply