# How to dynamically change multiple global variables in my request and call the same request again while dynamically changing these variables

**URL:** <https://community.postman.com/t/how-to-dynamically-change-multiple-global-variables-in-my-request-and-call-the-same-request-again-while-dynamically-changing-these-variables/17059>\
**Category:** Help Hub\
**Tags:** tests, scripts\
**Created:** [October 24, 2020, 12:53am UTC](https://community.postman.com/t/how-to-dynamically-change-multiple-global-variables-in-my-request-and-call-the-same-request-again-while-dynamically-changing-these-variables/17059 "2020-10-24T00:53:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jayanth0906](https://avatars.discourse-cdn.com/v4/letter/j/4af34b/32.png) [@Jayanth0906](https://community.postman.com/u/Jayanth0906)\
**Post date:** [October 24, 2020, 12:53am UTC](https://community.postman.com/t/how-to-dynamically-change-multiple-global-variables-in-my-request-and-call-the-same-request-again-while-dynamically-changing-these-variables/17059/1 "2020-10-24T00:53:06Z")

</div>

Hello,

I am trying to change the URL dynamically using global variables. I am trying to change two different global variables in the same request.

My script:

 ![postman Help](https://us1.discourse-cdn.com/getpostman/original/3X/1/3/134a5027ee7cf3902002435990b2b925002ef90c.jpeg)

Here I am looping the search by (global variable) and after the loop ends, I want to change the per page (global variable). When I use another if loop it is not giving me the desired output.

P.s I am doing negative testing.

How can I achieve this? It is working if both are in separate requests.
