<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Error while setting a QV Variable in a batch file in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Error-while-setting-a-QV-Variable-in-a-batch-file/m-p/964877#M468044</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The one way I know is to use additional variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/VvGroupType=1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and rewrite variable vGroup;&lt;/P&gt;&lt;P&gt;=if(vGroupType=1,'Party Food')&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 30 Sep 2015 08:14:21 GMT</pubDate>
    <dc:creator>pokassov</dc:creator>
    <dc:date>2015-09-30T08:14:21Z</dc:date>
    <item>
      <title>Error while setting a QV Variable in a batch file</title>
      <link>https://community.qlik.com/t5/QlikView/Error-while-setting-a-QV-Variable-in-a-batch-file/m-p/964876#M468043</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hopefully there is a simple solution for this. I have a batch file that goes like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;ECHO OFF&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;CLS&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;"C:\Program Files\QlikView\QV.exe" /L /VvGroup="Cake" "Path\v2\Demo_Model.qvw"&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;Echo Party Food Done!&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;which works perfectly, the model opens, sets the variable and refreshes - as you can see the variable set is vGroup = Cake, but as soon as i set the variable to a string with a gap:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ECHO OFF&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;CLS&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;"C:\Program Files\QlikView\QV.exe" /L /VvGroup="Party Food" "Path\v2\Demo_Model.qvw"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Echo Party Food Done!&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vGroup = Party Food&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get an error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas on a way around this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Richard&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Sep 2015 07:07:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-while-setting-a-QV-Variable-in-a-batch-file/m-p/964876#M468043</guid>
      <dc:creator />
      <dc:date>2015-09-30T07:07:09Z</dc:date>
    </item>
    <item>
      <title>Re: Error while setting a QV Variable in a batch file</title>
      <link>https://community.qlik.com/t5/QlikView/Error-while-setting-a-QV-Variable-in-a-batch-file/m-p/964877#M468044</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The one way I know is to use additional variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/VvGroupType=1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and rewrite variable vGroup;&lt;/P&gt;&lt;P&gt;=if(vGroupType=1,'Party Food')&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Sep 2015 08:14:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-while-setting-a-QV-Variable-in-a-batch-file/m-p/964877#M468044</guid>
      <dc:creator>pokassov</dc:creator>
      <dc:date>2015-09-30T08:14:21Z</dc:date>
    </item>
    <item>
      <title>Re: Error while setting a QV Variable in a batch file</title>
      <link>https://community.qlik.com/t5/QlikView/Error-while-setting-a-QV-Variable-in-a-batch-file/m-p/964878#M468045</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Sergey,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did something similar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I actually added an underscore to the variable name in the batch file and used a replace formula in the model to get the space back in.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;Batch File:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;ECHO OFF&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;CLS&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;"C:\Program Files\QlikView\QV.exe" /L /VvGroup="Party_Food" "Path\v2\Demo_Model.qvw"&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Echo Party Food Done!&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;Edit Module in Model:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sub AfterReload&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="line-height: 1.5em; font-size: 10pt;"&gt;Set v = ActiveDocument.Variables("vGroup")&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;STRONG style="line-height: 1.5em; font-size: 10pt;"&gt;vGroup &lt;/STRONG&gt;= v.GetContent.String&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;STRONG style="line-height: 1.5em; font-size: 10pt;"&gt;vGroup &lt;/STRONG&gt;= Replace(t, Chr(95), Chr(32))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(....I could then use &lt;STRONG style="line-height: 1.5em; font-size: 10pt;"&gt;vGroup &lt;/STRONG&gt;when going ahead with my Macro....)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;End Sub&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Richard&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Sep 2015 08:45:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-while-setting-a-QV-Variable-in-a-batch-file/m-p/964878#M468045</guid>
      <dc:creator />
      <dc:date>2015-09-30T08:45:58Z</dc:date>
    </item>
  </channel>
</rss>

