Last updated
Last updated
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).
See (link includes a video tutorial).
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 ), which are independent from any loop index. This is relevant if you use comparisons between dynamic data (comparisons are done with ).
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.
✅ 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.
(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:
Whenever you need to filter the rows, place 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.