# Is there a possibility to add iterations in Monitor

**URL:** <https://community.postman.com/t/is-there-a-possibility-to-add-iterations-in-monitor/18137>\
**Category:** Help Hub\
**Created:** [December 1, 2020, 11:18am UTC](https://community.postman.com/t/is-there-a-possibility-to-add-iterations-in-monitor/18137 "2020-12-01T11:18:33Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![allenheltondev](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/allenheltondev/32/31738_2.png) [@allenheltondev](https://community.postman.com/u/allenheltondev)\
**Post date:** [December 3, 2020, 12:39pm UTC](https://community.postman.com/t/is-there-a-possibility-to-add-iterations-in-monitor/18137/4 "2020-12-03T12:39:55Z")

</div>

You can add a prerequest script to Step 3 to be a loop counter:

```auto
let counter = pm.variables.get('loopCounter');
if(!counter){
  counter = 0;
}

pm.variables.set('loopCounter', counter++);

```

In your test scripts of the **Step 3** request you can add

```auto
const counter = pm.variables.get('loopCounter');
if(counter < 10) {
   postman.setNextRequest(request.name);
}

```

This will cause just that request to loop 10 times.

It’s the same problem/solution we discussed [in this thread](https://community.postman.com/t/there-was-an-error-in-evaluating-the-pre-request-script-typeerror-cannot-read-property-shift-of-undefined/18094/13)

---

_[View the full topic](https://community.postman.com/t/is-there-a-possibility-to-add-iterations-in-monitor/18137)._
