Grooper Help - Version 25.0
25.0.0017 2,127
  • Overview
  • Help Status

XML Lookup

Lookup Specification Grooper.EDI

Performs a lookup against an XML file using an XPath expression to retrieve data for Grooper fields.

Remarks

XML Lookup allows you to retrieve data from an XML file and populate Grooper fields by configuring the following:

  • Source: Choose the XML file (as a Resource File) that contains the data you want to query.
  • Record Selector: Enter an XPath expression to select the XML nodes (records) you want to retrieve.
    • You can use %FieldName variables in your XPath to insert values from Grooper fields at runtime.
    • Example: /Root/Record[Field1='%SomeField']
  • Value Selectors: Define one or more value selectors to extract specific values from each record node.
    • Each value selector specifies an XPath (relative to the record node) and maps the result to a Grooper field.

How it works

  1. The lookup loads the selected XML file.
  2. The Record Selector XPath is evaluated (with variables replaced by field values) to select one or more record nodes.
  3. For each record node, the configured Value Selectors extract values and populate the corresponding Grooper fields.

Tips

  • Use the % character to insert field variables in your XPath. For example, %InvoiceNumber will be replaced with the value of the "InvoiceNumber" field.
  • If your XPath does not return any nodes, no data will be populated.
  • If multiple nodes are returned, each will be treated as a separate result row.

Example Configuration

  • Source: Invoices.xml
  • Record Selector: /Invoices/Invoice[Number='%InvoiceNumber']
  • Value Selectors:
    • Path: Customer/Name, Target Field: CustomerName
    • Path: Total, Target Field: InvoiceTotal

This configuration will look up an invoice by its number and populate the customer name and total fields.

Properties

NameTypeDescription
General
Lookup Options
Lookup Info

See Also

Used By

Notification