Skip to main content
Open

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

Related products:Transformers
romersl
siennaatsafe
redgeographics
+39
  • romersl
    romersl
  • char_firstname
  • lindak
  • siennaatsafe
    siennaatsafe
  • redgeographics
    redgeographics
  • danilo_fme
    danilo_fme
  • asadamjad
  • warrendev
    warrendev
  • tcrossman
    tcrossman
  • vxn43
    vxn43
  • kennyo
    kennyo
  • canerakin
    canerakin
  • ranga_tolapi
    ranga_tolapi
  • milo89
    milo89
  • gbj1717
    gbj1717
  • nicohauri
    nicohauri
  • rhartley
  • bradr
    bradr
  • pangenib
  • mickleod
  • andre.utilit
  • pat_uow
    pat_uow
  • xabi
    xabi
  • alexvsn
  • sean_kurash
  • sacha
    sacha
  • davidlee
    davidlee
  • becchr
    becchr
  • anari
    anari
  • tschoppenhof
    tschoppenhof
  • geoal
    geoal
  • bozboswell
    bozboswell
  • reedwhit
    reedwhit
  • stevenjh
    stevenjh
  • tim.albert.vaa
    tim.albert.vaa
  • phoeffler
    phoeffler
  • veschwab
    veschwab
  • mapdog
  • michael.j
  • chris
  • cillingworth81
  • mavave
  • linda
  • p_c_20
    p_c_20

takashi
Contributor

***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!

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