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.

  1. Open a document in PIX Correction.
  2. Click on the button to the right of the field that requires Advanced Mapping.
    A small window is displayed with additional options.
  3. Click on the Advanced - edit rules Advanced Mapping - XSL icon 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.

  4. Click List view.
    A list of rules is displayed.
  5. Select the Convert value rule.
  6. Click Nodes view
    A table is displayed showing a list of parameters.
  7. Click in the empty field to the right of the Section field.
  8. 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.
  9. Click Map.
    The selected node is displayed beside the Section field and the dashed outline is now yellow.
  10. Click on the empty field to the right of the targetnode field.
  11. 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.
  12. 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.
  13. Enter the value from one of the targetnode values into the targetvalue field.
  14. 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.
  15. Enter a value into the alternativevalue field.

    This value is applied whenever the targetnode value does not match the specified targetvalue.

  16. Click Close Close icon.
    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.