Dynamic Loop

Dynamic loop is used to iterate over existing rows in a data table.

Suitable for

  • Updating existing data - example: visiting profile links from a data table and adding profile details such as "About Me" section to the existing rows or updating their qualification status based on certain conditions.

  • Performing actions on existing data - example: visiting profile links from a data table and auto-sending outreach messages.

Key characteristics

  • Iterates over existing rows until it consumes all rows.

  • If you don't want to iterate over all rows but need to access, for example, only one row, enter 1 to the optional repetition limit (or any other number that you need).

Example set-up

See Enrich Existing Data (link includes a video tutorial).

Tips

Do not mix different data tables in the same dynamic loop

Your loop is tied to a specific data table.

It's error-prone to use references to other data tables inside that loop.

If you need data references from sources other than the looping-through data table, use variables (see Using Variables), which are independent from any loop index. This is relevant if you use comparisons between dynamic data (comparisons are done with Start Condition and Set Condition).

Increase TaskBot run speed by filtering rows

Whenever you need to filter the rows, place Start Condition and Set Condition building block pair right after Start Repeat. By doing so, you will ensure that our system will sort out all the rows that are not relevant before passing the rows to the TaskBot to iterate over.

Rows will be pre-filtered -> TaskBot runs faster, it will iterate over a small(er) subset of rows

Works but rows will not be pre-filtered because condition is not placed right after Start Repeat -> TaskBot runs slower, it will iterate over ALL rows

Works but rows will not be pre-filtered because there are multiple conditions -> TaskBot runs slower, it will iterate over ALL rows

Note: If your Set Condition building block contains references to data tables or variables, the pre-filtering optimization is not applied. This is because it's possible for you to update the data table and variable references within the loop, which would dynamically change the condition, and so pre-filtering is not possible. There are strategies to circumvent this, see advanced question and tutorial below.

FAQ

(Advanced question) I have a data table with records that I need to match to records from another data table on every loop iteration. Looping through the whole data table on every match operation is not efficient. Is there a way to increase efficiency?

(Advanced Answer) Yes, you can increase efficiency by leveraging the pre-filtering logic, using Break Repeat and, if applicable, alphabetic matching. Here is a tutorial that covers all of these strategies:

Last updated