title: Google Tag Manager Shows Data Layer Variable Values as undefined in the fired tag
body: <p>I am trying to add dataLayer variable values inside my tag, but when I look at the tag fired inside the Network tab of my console in Chrome, I see that the tag has been populated with undefined values, even though the dataLayer object in console has the right values.</p>
  
  <p>Here is my dataLayer variable in GTM:</p>
  
  <p><a href="https://i.stack.imgur.com/9xQrp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9xQrp.png" alt="enter image description here"></a></p>
  
  <p>This is how I access the value inside the tag:</p>
  
  <p><code>ORDERID={{ORDERID}}</code></p>
  
  <p>And this is what I see as dataLayer values in console:</p>
  
  <p><a href="https://i.stack.imgur.com/UU570.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UU570.png" alt="enter image description here"></a></p>
  
  <p>But inside the network tab, I see that the dataLayer variable is undefined:</p>
  
  <p><a href="https://i.stack.imgur.com/nvURo.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nvURo.png" alt="enter image description here"></a></p>
  
  <p>This is how my Tag Manager's DataLayer in preview mode looks like:</p>
  
  <p><a href="https://i.stack.imgur.com/MPYWJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MPYWJ.png" alt="enter image description here"></a>
  Why?? I am pulling my hair over this now. How can I access dataLayer variable values?</p>