I have a map that's output is xml.
One of the xml output sections is a loop on Party.
I have another output section element that I want to reference the output Party Loop in; and from what I read; the correct Looping Function for referencing output is LoopCopy or LoopReference.
LoopCopy almost works for what I need; except that for some reason, it does not include a Filter method on it. (I need to filter).
LoopReference does have a Filter on it; so I am trying to use it; but get errors on it.
Here is the runtime error:
2: Error - An reference in an LoopIndex/Variable was made to an either an input map element or an output map element that is not in the context of the reference. Use an enclosing looping output map element here. (1202)
Map: Maps/Ash/tx103_Ash_Alip/Acord103Term.xml - Map Element: out$/TXLife/TXLifeRequest/OLifE/Party
Enclosing [Map] Element : Map: Maps/Ash/tx103_Ash_Alip/Acord103Term.xml - Map Element: out$/TXLife/TXLifeRequest/OLifE/Party/Attributes/id
Here is a screencap of my usage of LoopReference.
Why is the LoopReference complaining about the reference to the id attribute of the Party loop not being in the context of the reference?
I have not been able to find any examples on LoopReference; any insight on this would be great; (or if anyone has a way to put a filter on a LoopCopy, that too would help me).
Found how to accomplish this.
On the Loop tab, used a LoopCopy
referencing Map Element /TXLife/TXLifeRequest/OLifE/Party ---- without filter
This gives me all the items from the party output group loop.
Then in each element inside of the target Loop set an If condition pointing back to the Party looking at a field value of a control element that I would have done the filter on; manually to cull out those not wanted.
It works as designed; just not as clean as it could be if the LoopCopy had a filter function ; or if the LoopReference worked like a LoopCopy with a filter.
Could never get LoopReference to work.
Watch the recorded webinar!
Create systems and workflow to manage clean data ingestion and data transformation.
Introduction to Talend Open Studio for Data Integration.
Test drive Talend's enterprise products.