# Skipping iteration on collection runner

**URL:** <https://community.postman.com/t/skipping-iteration-on-collection-runner/8521>\
**Category:** Help Hub\
**Tags:** collection-runner\
**Created:** [October 23, 2019, 9:31am UTC](https://community.postman.com/t/skipping-iteration-on-collection-runner/8521 "2019-10-23T09:31:25Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mithunlikes](https://avatars.discourse-cdn.com/v4/letter/m/eb8c5e/32.png) [@mithunlikes](https://community.postman.com/u/mithunlikes)\
**Post date:** [October 23, 2019, 9:31am UTC](https://community.postman.com/t/skipping-iteration-on-collection-runner/8521/1 "2019-10-23T09:31:25Z")

</div>

Hi Team,  
As we know using Postman Collection runner, we can iterate n number of times using a data file (csv/json).e.g: This is my csv file.  
**Variable,Value**  
**a,1**  
**b,2**  
**c,3**  
If we use iterations value as 3, all the 3 variables (a,b,c) will be executed one by one.  
But I want to only use variable b as data for my test. I don’t want to iterate through all the values.  
**Is this possible to do with Postman?**

---

<div class="post-metadata">

**Author:** ![suraj.purohit](https://avatars.discourse-cdn.com/v4/letter/s/858c86/32.png) [@suraj.purohit](https://community.postman.com/u/suraj.purohit)\
**Post date:** [October 23, 2019, 9:49am UTC](https://community.postman.com/t/skipping-iteration-on-collection-runner/8521/2 "2019-10-23T09:49:27Z")

</div>

Hi @mithunlikes ,

Welcome to the community! You can [go through the solution mentioned here](https://community.postman.com/t/skip-array-element-if-variable-blank-null-in-csv/1163/2), it’s similar to your problem.

Useful documentation:  
[https://learning.getpostman.com/docs/postman/collection\_runs/running\_multiple\_iterations/#programmatically-customize-iteration-data](https://learning.getpostman.com/docs/postman/collection_runs/running_multiple_iterations/#programmatically-customize-iteration-data)

---

<div class="post-metadata">

**Author:** ![mithunlikes](https://avatars.discourse-cdn.com/v4/letter/m/eb8c5e/32.png) [@mithunlikes](https://community.postman.com/u/mithunlikes)\
**Post date:** [October 23, 2019, 10:34am UTC](https://community.postman.com/t/skipping-iteration-on-collection-runner/8521/3 "2019-10-23T10:34:20Z")

</div>

Hi @suraj.purohit,

Thanks for the swift response.

The solution you have suggested works on the case where we have blank("") values.

I am looking for something where we can skip an iteration itself. e.g. I have 3 sets of data in my previous example (mentioned in the question).

I want to only use iteration 2 data, which means I want to skip iteration 1 and 3 completely, so that i can access variable “b” and value “2” only for my test.

Please suggest me on same. Thanks in advance.

---

<div class="post-metadata">

**Author:** ![jonsworkalias](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/jonsworkalias/32/3153_2.png) [@jonsworkalias](https://community.postman.com/u/jonsworkalias)\
**Post date:** [October 23, 2019, 3:35pm UTC](https://community.postman.com/t/skipping-iteration-on-collection-runner/8521/4 "2019-10-23T15:35:23Z")

</div>

Write code that reads the file, and then uses the 2nd value to set environment variables that are used for all runs.

Personally I would create a pre-run call that does the variable setup. Then loop over the call that runs multiple times and read the values set in earlier call.

---

<div class="post-metadata">

**Author:** ![mithunlikes](https://avatars.discourse-cdn.com/v4/letter/m/eb8c5e/32.png) [@mithunlikes](https://community.postman.com/u/mithunlikes)\
**Post date:** [October 25, 2019, 4:51am UTC](https://community.postman.com/t/skipping-iteration-on-collection-runner/8521/5 "2019-10-25T04:51:46Z")

</div>

@jonsworkalias  
Thanks for the response. So looks like we can’t skip the iteration and access to a random iteration number using collection runner 😑
