Skip to content

Commit

Permalink
Fix a typo in looping.md
Browse files Browse the repository at this point in the history
  • Loading branch information
amrawadk authored Aug 20, 2023
1 parent 2871530 commit d32d9d5
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 d32d9d5

Please sign in to comment.