Forum

Jennifer Häfner
      Has successfully completed the online course Intermediate (200)
      Has successfully completed the online course Advanced (300)
      Has successfully completed the online course Basics (100)
      Has successfully completed the online course Advanced (310)
      Has successfully completed the online course Advanced (320)
      Has successfully completed the Intermediate Certification
      Has successfully completed the Advanced Certification
    1 year ago #38225
    Up
    2
    Down
    ::

    Hi Florian,

     

    In the attachments, I provided you with some screenshots on how to use the Iterator.

    The Iterator works like a ‘foreach’ loop in Javascript, it takes an array (in Simplifier: collection) as input and loops over each object in the array (in Simplifier: struct). In the Iterator’s output nodes ‘each’ and ‘after’, you can define what should happen in each iteration, and what should happen after the last iteration has been finished.

    As for the input mapping for the Iterator, you need to define over which collection you want to loop over (this is the left/parameter side). Here, select any collection, for example, a global variable or items of a table/list.

    For the right/variable side, create a new global variable. The datatype needs to be the same struct that is defined for the input collection. In our example, we loop over a collection of the datatype ‘Address_Col’ that is stored in a global variable. This collection contains addresses with the datatype ‘Address_Struct’. So, on the right side, we use a global variable of the same datatype, ‘Address_Struct’. In each iteration, the current struct is stored in this global variable, so you can use its data in the process that is defined for the ‘each’ output node.

     

    I hope this makes it more clear how to use the Iterator.

    Attachments:
    You must be logged in to view attached files.