Simple For Loop for Infotable Iteration

    This is using the simplest structure to do a look through an infotable.  It's simple but it avoids having to use row indexes and cleans up the code for readability as well.

     

    //Assume incoming Infotable parameter names "thingList"
    for each (row in thingList.rows) {
         // Now each row is already assigned to the row variable in the loop
         var thingName = row.name;
    }
    

     

    You can also nest these loops (just use a different variable from "row").  Also important to note to not add or remove row entries of the Infotable inside the loop.  In this case you may end up skipping or repeating rows in the loop since the indexes will be changed.