Dynamic Loop

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

Suitable for

  • Updating existing data - example: visiting profile links from a 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 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 tables in the same dynamic loop

Your loop is tied to a specific table.

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

If you need data references from sources other than the looping-through 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

Note: This section below is about an in-built optimization technique where rows are pre-filtered and not passed to TaskBot. This pre-filtering technique only applies to ZeroWork native tables and does not apply to Google Sheets tables.

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 tables or variables, the pre-filtering optimization is not applied. This is because it's possible for you to update the 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 table with records that I need to match to records from another table on every loop iteration. Looping through the whole 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