How to use Iterator process element?

  • Florian Saß
        Has successfully completed the online course Introduction
        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)
      1 year ago #38224

      Hey,

      can someone explain to me how the Iterator process element works? I can’t find anything about it in the documentation, forum or elsewhere. I tried experimenting with it but can’t figure out how to configure the input with the ‘variable’ and ‘parameter’ values.

      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.
      Viewing 2 posts - 1 through 2 (of 2 total)

      You must be logged in to reply to this topic.