Convert a Value
If an XML file typically contains a value that is not easily recognised, it is possible to convert that value to something more recognizable.
For example, an XML document contains the vendor country that is different to the Bill-To country. These country codes are not in the expected format (i.e. en_US), so you can provide the correct country codes for these two countries.
You can configure the Convert a value rule by following these steps.
- Open a document in PIX Correction.
-
Click on the button to the right of the field that requires
Advanced Mapping.
A small window is displayed with additional options.
-
Click on the
Advanced - edit rules
button.
The text of this button depends on whether an Advanced rule already exists, or if the field has a standard mapping.
The Advanced rule window is displayed in Nodes view.
-
Click
List
view.
A list of rules is displayed.
- Select the Convert value rule.
-
Click
Nodes
view
A table is displayed showing a list of parameters.
- Click in the empty field to the right of the Section field.
-
Locate the corresponding XML node in the XML View and click on it.
The entire node is surrounded with a light-blue dashed box and the Map button is displayed.
-
Click
Map.
The selected node is displayed beside the Section field and the dashed outline is now yellow.
- Click on the empty field to the right of the targetnode field.
-
Locate the corresponding XML node or tag in the XML View and click on it.
The entire node is surrounded with a light-blue dashed box and the Map button is displayed.
-
Click
Map.
The selected node is displayed beside the targetnode field, a list of possible matches is displayed in the third column of the table, and the dashed outline is now yellow.
- Enter the value from one of the targetnode values into the targetvalue field.
-
Enter a value into the
translatevalue field that will replace the specified
targetvalue.
This is the value that is returned whenever the targetnode matches the value specified above.
-
Enter a value into the
alternativevalue field.
This value is applied whenever the targetnode value does not match the specified targetvalue.
-
Click
Close
.
Your changes are saved as you make them.The default Field view is displayed and if the advanced mapping finds a value, the field is populated with that value.