# postman.setNextRequest not working

**URL:** <https://community.postman.com/t/postman-setnextrequest-not-working/14820>\
**Category:** Help Hub\
**Tags:** collections, scripts, collection-runner\
**Created:** [August 7, 2020, 5:20pm UTC](https://community.postman.com/t/postman-setnextrequest-not-working/14820 "2020-08-07T17:20:47Z")\
**Posts on this page:** 7\
**Page:** 2

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [November 24, 2023, 11:53am UTC](https://community.postman.com/t/postman-setnextrequest-not-working/14820/21 "2023-11-24T11:53:06Z")

</div>

This would be the place to raise all Feature Requests 😓

> **[Build software better, together](https://github.com/postmanlabs/postman-app-support/issues/new?assignees=&labels=feature&projects=&template=feature_request.yml&title=%3Ctitle%3E)**
>
> GitHub is where people build software. More than 100 million people use GitHub to discover, fork, and contribute to over 420 million projects.

---

<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:** [November 24, 2023, 11:57am UTC](https://community.postman.com/t/postman-setnextrequest-not-working/14820/22 "2023-11-24T11:57:00Z")

</div>

As I don’t personally need this feature. I’ll let someone who really needs it to raise a request. 🥺

---

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [November 24, 2023, 12:06pm UTC](https://community.postman.com/t/postman-setnextrequest-not-working/14820/23 "2023-11-24T12:06:45Z")

</div>

It sounded like it or was worded like it was something you felt was missing or how the function could be improved. ❤

Feature Requests, Improvements, Issues etc. raised on the Community Forum just get lost in threads of topics so it’s always best to raise them directly on the Public Tracker. 🙏

I’ve included the _quick links_ to the forum site, which go directly to those forms on Github 🏆

 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/d/1/d1ffb9786080ac9acebe2c6164d4f881e6a1518d.png)

---

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [November 24, 2023, 4:48pm UTC](https://community.postman.com/t/postman-setnextrequest-not-working/14820/24 "2023-11-24T16:48:14Z")

</div>

@ngeeta123

I’ve created a Collection in my Public Workspace as a short term solution but I will be improving this and adding it to the Postman Answers Public Workspace. This is based on the Collection that @vdespa created [for this video](https://www.youtube.com/watch?v=FWYKOR0Zj28).

[https://www.postman.com/dannysbattlefield/workspace/danny-dainton-s-public-workspace/collection/8213448-08f3e5d9-5382-4e0e-9aab-75ab9e07672a?action=share&source=copy-link&creator=8213448](https://www.postman.com/dannysbattlefield/workspace/danny-dainton-s-public-workspace/collection/8213448-08f3e5d9-5382-4e0e-9aab-75ab9e07672a?action=share&source=copy-link&creator=8213448)

This can be used to show you how you can achieve the flow that you’re looking to do - It’s only an example so it might need tweaking.

 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/1/3/13b2212187cfab9c793a7b53eaef9a9967f9a159.jpeg)

This scenario is controlled by a JSON data file:

```json
[
    {
        "routes": [
            "Common",
            "Request 2",
            "Common",
            "Request 3",
            "Common",
            "Request 4",
            "Common"
        ]
    }
]

```

---

<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:** [November 24, 2023, 6:09pm UTC](https://community.postman.com/t/postman-setnextrequest-not-working/14820/25 "2023-11-24T18:09:37Z")

</div>

The principle behind that looks solid.

It’s a bit more re-usable than hardcoding the request that needs to run next into the requests test tab.

I would say its a bit more flexible and potentially more robust and easer to troubleshoot as you would be generally be checking the input file.

I guess you could also use this with an environment or collection variable instead of a data file.

---

<div class="post-metadata">

**Author:** ![ngeeta123](https://avatars.discourse-cdn.com/v4/letter/n/3ec8ea/32.png) [@ngeeta123](https://community.postman.com/u/ngeeta123)\
**Post date:** [November 25, 2023, 6:32am UTC](https://community.postman.com/t/postman-setnextrequest-not-working/14820/26 "2023-11-25T06:32:17Z")

</div>

Thanks @danny-dainton it was really helpful

---

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [November 26, 2023, 10:06am UTC](https://community.postman.com/t/postman-setnextrequest-not-working/14820/27 "2023-11-26T10:06:08Z")

</div>

Yeah, it’s just reading an array of routes, which could be in a number of places.

Would need a small change to the script but totally doable, depending on your context.

[Previous page](https://community.postman.com/t/postman-setnextrequest-not-working/14820.md?page=1)
