Skip to main content
Open

Add a Transformer to Perform Iterative Operations for List Attributes - ListIter

Related products:Transformers
siennaatsafe
takashi
jdh
olivier
+4
  • siennaatsafe
    siennaatsafe
  • takashi
    takashi
  • jdh
    jdh
  • olivier
    olivier
  • jonathan
  • cwarren
    cwarren
  • roland
    roland
  • geoal
    geoal
  • kweller
    kweller

takashi
Supporter

***Note from Migration:***

Original Title was: Add a Transformer to Perform Iterative Operations for List Attributes - ListIterator (tentative)


The expected transformer performs iterative operations for every element of specified lists, and then stores the result into new lists or overwrites source lists by the result. The user can declare aliases of source lists and define math or string expressions through the parameters dialog, like this.

The index surrounded by square brackets in the expressions indicates relative position of elements. i.e. [0] indicates every element, [<negative>] indicates a prior element, [<positive>] indicates a subsequent element. An editor similar to the Arithmetic or Text Editor can also be used to enter each expression. This transformer should support both simple list (e.g. _list{}) and complex (structured) list (e.g. _list{}.foo, _list{}.bar).

Example: If the source list and non-list attributes contain these values:

_list{}.foo = [1,2,3,4,5] _list{}.bar = [10,20,30,40,50] n = 1 prefix = 'P'

the destination list should be:

_list{}.a = [2,3,4,5,6] _list{}.b = [<null>,20,30,40,<null>] _list{}.c = [11,22,33,44,55] _list{}.d = ['001_S','002_S','003_S','004_S','005_S'] _list{}.e = ['P_101','P_202','P_303','P_404','P_505'] 

[Addition] It would be ideal if each expression could have "circular list" option. If the option is ON, the _list{}.b should be:

_list{}.b = [26.66666...,20,30,40,33.33333...]

0 replies

Be the first to reply!

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings