Skipping REQUEST in Pre-req to move on to the next REQUEST

postman.setNextRequest(null);
postman.setNextRequest(“null”);

The above code did not work for either a loop or a complete stop to the request in the pre-req.

Thank you for your help in advance!

You might need to provide more context and information to the questions, it’s a little unclear how you’re using this.

It also might help to explain your workflow.

Would you be able to add some screen shots or the full script?

Hi @ysaead,

As Danny mentioned, it would help to get some context and information to assist you better. In the meantime, If I understand your concern correctly, I believe the following segment in the documentation may explain the behaviour you’re observing:

https://learning.postman.com/docs/postman/collection-runs/building-workflows/#advanced-workflow

postman.setNextRequest() is always executed at the end of the current request. This means that if you put this function before other code blocks anywhere in pre-request or test script, these blocks will still execute.

Hopefully, this helps!

Thank you SabriH! I spent more than 6 hours testing with it unfortunately.