XPATH results "spilling" into incorrect rows

Hiya,

I have a workflow that helps digest transaction level detail from purchase orders. Basically, a purchase order transaction would have Vendor, Item Code, Item Name, Item Cost, Quantity, Total.

The workflow looks like this:

I’ve an issue that I’ve isolated down to the XPath node where it seems to be “misplacing” the results onto the wrong rows. For example, one item’s cost would show up on other items’ lines.

My general XPath configuration is as such:

Am I missing something obvious?

Here’s what I’m expecting:
image
(verified these results across the whole workflow up to Xpath)

Here’s what I’m getting:
image

Hi wisemanleo,

do your XPath queries in two steps:

  1. First, using one XPath node, extract /root/results/item/values and return a “Node Cell” using the “Multiple Rows” option
  2. then, using a second XPath node, further split up each item in values in the individual columns (i.e. /trandate, /tranid, relative to the current values element)

Hope this helps!

–Philipp

1 Like

Beer #3 I owe you. Do I keep “fragment” in the XML fragment name field?

Have edited as such:
image

In first xpath:
image

In second:

Been running a few minutes but still at 0%.

Got it working!
This is has to be my new favourite node. The key to the second step is to literally make it a function of the first step, so each xpath line has to be updated accordingly so it’s not referring to the root code. The reference in the 2nd node also has to be to the node cell.

The configuration in the first xpath is thus:

And the second node needs to then refer to the new Node Cell, and the constituent xpath’s need to be:
image

Thanks again @qqilihq!!

3 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.