Skip to main content

Hi all,

Hopefully a simple question! I have a custom transformer that I have exported to a FMX as it contains blocking transformers and looping. I want to use the iteration count value to calculate another attribute value but I cannot for the life of me work out how to access the iteration count attribute from within the workspace.

 

iteration_countThanks for your help.

Cheers,

Barrett

@gio​  provides a strategy for accessing the "Attribute to hold iteration count" in this post: https://community.safe.com/s/question/0D54Q000080hdrkSAA/how-to-expose-attribute-iteration-count-in-a-loop


Or a simplified method could be to:

1) Edit definition for $(ITERATION_COUNT_ATTR) >

1.1) make it private parameter

1.2) set value to '_iteration_count' --can be any text, but I borrowed this value from your example above.

2) add AttributeCreator and create new attribute '_iteration_count' with attribute value = $(INTERATION_COUNT_ATTR)Screenshot 2020-12-01 134720<==1

Screenshot 2020-12-01 134832<==2

 

Hoped this helped!😎


Reply