One Star pti
One Star

How to access iterator value in tLoop?

When iterating using tLoop, is it possible to access the current value of the iterator from the downstream component? If so, how would I go about doing that? I am looking to do a crude unpivot using tFLowToIterate, tLoop and tFixedFlowInput, but I would like to retrieve columns that are named using integers (e.g., column_1, column_2) from the globalMap in tFixedFlowInput.
Essentially, I would like to provide a mapping in the tFixedFlowInput that looks like:
(Integer) globalMap.get("column_" + currentLoopValue.toString())
1 REPLY
One Star Lie
One Star

Re: How to access iterator value in tLoop?

Hi
Use : ((Integer)globalMap.get("tLoop_1_CURRENT_VALUE"))
(you can access it by autocompletion, when writing "tLoop_1" (the actual name of your component) then Ctrl+Space)

Regards,
Lie