title: Qlikview - set up a global variable defining a server
body: <p><strong>Intro:</strong> 
  Every QVW has their own variables that manually defined where to store/load the records they pulled in their SQL scripts.</p>
  
  <p>ex:</p>
  
  <pre><code>SET vLoadPath = \\dev_server\Extract QVD\;
  SET vStorePath = \\dev_server\Transform QVD\;
  </code></pre>
  
  <p><strong>Scenario:</strong></p>
  
  <ul>
  <li>As Qlikview Admin, we promote tested QVWs from DEV to PROD environment. </li>
  <li>Variable path is always hardcoded in DEV (see example code above)</li>
  <li>When we promote the QVW in PROD, we will change the defined path variable to have a 'prod_server'.</li>
  </ul>
  
  <p><strong>Question:</strong></p>
  
  <p>Is there a way to make the sample variables above, be a Global variable? These variables will change its value when we promote the QVW from DEV to PROD environment.</p>
  
  <p><strong>Reason:</strong></p>
  
  <p>I think the manual changing of hardcoded path variable is a poor practice. 
  What if the server should change?  Or the subdirectory?
  Then you’ll have to go back into every single QVW script and change the hardcoded subdirectory path.
  Not only is that a high cost, it also introduces the possibility of error.</p>