title: Pass dynamic value to url in Postman
body: <p>I have 2 requests </p>
  
  <h1>1st Request</h1>
  
  <p>After did my first request, I get the response where I can parse for a taskId</p>
  
  <p>In my test tab, I will then parse and store it like this </p>
  
  <pre><code>let taskId = pm.response.json().body.result[0].data.task
  console.log(taskId)
  </code></pre>
  
  <p>I can see taskId printing in my console as <code>938</code></p>
  
  <h1>2nd Request</h1>
  
  <p>I require making a GET with this dynamic URL with the <code>taskId</code> that I got from the first one</p>
  
  <pre><code>http://localhost:3000/fortinet/monitor/{{taskId}}
  </code></pre>
  
  <p>So I set the above URL , set the HTTP verb to <code>GET</code> </p>
  
  <p>in my Pre-request Script tab, I did this </p>
  
  <pre><code>let taskId = pm.globals.get("taskId") 
  </code></pre>
  
  <h1>Result</h1>
  
  <blockquote>
    <p>ReferenceError: taskId is not defined</p>
  </blockquote>
  
  <p>Image Result </p>
  
  <p><a href="https://i.stack.imgur.com/rt6VK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rt6VK.png" alt="enter image description here"></a></p>
  
  <p>How can I debug this further?</p>