# Iterate through a collection but execute a particular request once

**URL:** <https://community.postman.com/t/iterate-through-a-collection-but-execute-a-particular-request-once/49068>\
**Category:** Help Hub\
**Created:** [June 29, 2023, 3:45pm UTC](https://community.postman.com/t/iterate-through-a-collection-but-execute-a-particular-request-once/49068 "2023-06-29T15:45:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kieran-work](https://avatars.discourse-cdn.com/v4/letter/k/3bc359/32.png) [@kieran-work](https://community.postman.com/u/kieran-work)\
**Post date:** [June 29, 2023, 3:45pm UTC](https://community.postman.com/t/iterate-through-a-collection-but-execute-a-particular-request-once/49068/1 "2023-06-29T15:45:11Z")

</div>

_ **My question** _:  
When Iterating through a collection, is it possible to execute a request once, even though the iterations amount is more than 1?

Example:

Iterations = 5

Collection:  
Test ABC - execute request ONCE  
Test DEF - Iterate x 5  
Test GHI - Iterate x 5

---

<div class="post-metadata">

**Author:** ![michaelderekjones](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/michaelderekjones/32/14819_2.png) [@michaelderekjones](https://community.postman.com/u/michaelderekjones)\
**Post date:** [June 29, 2023, 4:59pm UTC](https://community.postman.com/t/iterate-through-a-collection-but-execute-a-particular-request-once/49068/2 "2023-06-29T16:59:17Z")

</div>

Do you mean “request” rather than tests.

The tests are the code in the tests tab. (You can have requests without any tests).

As far as stopping a particular request from running, I don’t think that is possible.

One workaround would be to have a pre-request script on the “Test DEF” request that reads the iteration counter and if its 1, sends a request using the Postman sendRequest() functionality.

```auto
let iterationCounter = pm.info.iteration:Number // The value of the current iteration:

```

It just means that request is written in code in the pre-request script. (It can still have tests attached).

[Postman JavaScript reference | Sending requests from scripts](https://learning.postman.com/docs/writing-scripts/script-references/postman-sandbox-api-reference/#sending-requests-from-scripts)
