Six Stars

Mapper Output LoopReference help


I have a map that's output is xml.

One of the xml output sections is a loop on Party[4].

I have another output section element that I want to reference the output Party[4] 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[4]
Enclosing [Map] Element : Map: Maps/Ash/tx103_Ash_Alip/Acord103Term.xml - Map Element: out$/TXLife/TXLifeRequest/OLifE/Party[4]/Attributes/id


Here is a screencap of my usage of LoopReference.

LoopReference.PNG

 

Why is the LoopReference complaining about the reference to the id attribute of the Party[4] 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).


 

 

Tags (1)
1 REPLY
Six Stars

Re: Mapper Output LoopReference help

Found how to accomplish this.
On the Loop tab, used a LoopCopy
referencing Map Element /TXLife/TXLifeRequest/OLifE/Party[4] ---- without filter Smiley Sad 

This gives me all the items from the party[4] output group loop.

Then in each element inside of the target Loop set an If condition pointing back to the Party[4] 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.