Skip to content

Commit

Permalink
Merge pull request #27 from amrawadk/main-1
Browse files Browse the repository at this point in the history
Fix a typo in looping.md
  • Loading branch information
Kholid060 authored Feb 6, 2024
2 parents 84899dd + d32d9d5 commit c716654
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/workflow/looping.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ The <code v-pre>{{loopData.loopId}}</code> expression will return:
"$index": 1
}
```
So if you want to access the index of the loop, you can use [expressions](./expressions.md) like <code v-pre>{{loopData.loopId.$index}}</code>; And to get the loop value, you don't need to write the `data` property like <code v-pre>{{loopId.loopId.data}}</code>; Automa will automatically assign it to the expressions. But if you use [JavaScript expressions](./expressions.md#javascript-expressions), you must include the `data` property <code v-pre>!!{{loopData.loopId.data}}</code>
So if you want to access the index of the loop, you can use [expressions](./expressions.md) like <code v-pre>{{loopData.loopId.$index}}</code>; And to get the loop value, you don't need to write the `data` property like <code v-pre>{{loopData.loopId.data}}</code>; Automa will automatically assign it to the expressions. But if you use [JavaScript expressions](./expressions.md#javascript-expressions), you must include the `data` property <code v-pre>!!{{loopData.loopId.data}}</code>

## Using the Repeat Task Block

Using the [Repeat Task block](../blocks/repeat-task.md) is the easiest way to do looping. You only need to define how many times to repeat the actions and where to start to repeat them.

![Repeat task](https://res.cloudinary.com/chat-story/image/upload/v1666322277/automa/chrome_LWjlxa5ZMT_t2jrr2.png)

The above will start to repeat to execute from the Click Element block, and after it executes three times. The workflow will continue to the New Tab block.
The above will start to repeat to execute from the Click Element block, and after it executes three times. The workflow will continue to the New Tab block.

0 comments on commit c716654

Please sign in to comment.