Posted: Mon Dec 07, 2015 3:35 am Post subject: How can i Get Index(Counter) variable in Mapping Node.
Newbie
Joined: 21 Feb 2012 Posts: 7
There was requirement of I need to send the Index Number(Occurrence count for each iteration) to the backend system but i didn't receive this from front end Channel.
How can i achieve this on Mapping Node on WMB version 8.0.Can some one please suggest.
In the Graphical Data Mapper there are several things that can help.
Assuming you are using a For each transform this provides the $VarName-index variable to indicate the index of the input array that the Graphical Data Mapping editor is processing.
In later fixpacks it also provides the $VarName-count variable to determine the number of times the Graphical Data Mapping editor enters the nested mapping to allow populating the output array.
Note if you have a filter expression on a for each, that might exclude some input iterations, hence the provision of both an input index and a "output" count variable.
Note these are only documented fully with examples in IIB v10 Knowledge Center. You can confirm if they are supported in your version by simply using "Ctrl-space" content assist to see if the variables are offered.
For each
Also since the Graphical Data Mapper supports XPath 2.0, you have access to functions like fn:count($var) to determine the count of instances of a repeating input element.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum