<?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: Set value for mutiple variables in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-value-for-mutiple-variables/m-p/775767#M275041</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've attached my .qvw if it helps explain my solution above.&amp;nbsp; Basically, it loops through each variable in the document and assigns the same value (based on input box) to those that begin with "vSet".&amp;nbsp; You can play around with the syntax.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 13 Jan 2015 11:05:12 GMT</pubDate>
    <dc:creator>jzimolong</dc:creator>
    <dc:date>2015-01-13T11:05:12Z</dc:date>
    <item>
      <title>Set value for mutiple variables</title>
      <link>https://community.qlik.com/t5/QlikView/Set-value-for-mutiple-variables/m-p/775757#M275031</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i'm looking for a tips to set a value for more then ten variables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, i'm using a button with action 'set varaible' ten times &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt; not really good !!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Jan 2015 15:39:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-value-for-mutiple-variables/m-p/775757#M275031</guid>
      <dc:creator />
      <dc:date>2015-01-12T15:39:36Z</dc:date>
    </item>
    <item>
      <title>Re: Set value for mutiple variables</title>
      <link>https://community.qlik.com/t5/QlikView/Set-value-for-mutiple-variables/m-p/775758#M275032</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you setting same value to all of those variables?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Jan 2015 15:52:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-value-for-mutiple-variables/m-p/775758#M275032</guid>
      <dc:creator>Clever_Anjos</dc:creator>
      <dc:date>2015-01-12T15:52:51Z</dc:date>
    </item>
    <item>
      <title>Re: Set value for mutiple variables</title>
      <link>https://community.qlik.com/t5/QlikView/Set-value-for-mutiple-variables/m-p/775759#M275033</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yep&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Jan 2015 15:55:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-value-for-mutiple-variables/m-p/775759#M275033</guid>
      <dc:creator />
      <dc:date>2015-01-12T15:55:25Z</dc:date>
    </item>
    <item>
      <title>Re: Set value for mutiple variables</title>
      <link>https://community.qlik.com/t5/QlikView/Set-value-for-mutiple-variables/m-p/775760#M275034</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could write a small macro to set all those variable, but using macros is usually a bad idea.&lt;/P&gt;&lt;P&gt;I would stay using 10 actions&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Jan 2015 16:03:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-value-for-mutiple-variables/m-p/775760#M275034</guid>
      <dc:creator>Clever_Anjos</dc:creator>
      <dc:date>2015-01-12T16:03:01Z</dc:date>
    </item>
    <item>
      <title>Re: Set value for mutiple variables</title>
      <link>https://community.qlik.com/t5/QlikView/Set-value-for-mutiple-variables/m-p/775761#M275035</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hoo noo &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/P&gt;&lt;P&gt;i tried :&lt;/P&gt;&lt;P&gt;VAl1;VAL2;VAL3&lt;/P&gt;&lt;P&gt;or &lt;/P&gt;&lt;P&gt;VAl1,VAL2,VAL3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;nothing works&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Jan 2015 16:13:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-value-for-mutiple-variables/m-p/775761#M275035</guid>
      <dc:creator />
      <dc:date>2015-01-12T16:13:52Z</dc:date>
    </item>
    <item>
      <title>Re: Set value for mutiple variables</title>
      <link>https://community.qlik.com/t5/QlikView/Set-value-for-mutiple-variables/m-p/775762#M275036</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;OL&gt;&lt;LI&gt;Setup the vbscript macro below and assign to a button action&lt;/LI&gt;&lt;LI&gt;Make sure your variables have the same first few characters, like "vSet", so macro knows which ones to loop through&lt;/LI&gt;&lt;LI&gt;Click button, input the value you need to set, then it will loop through them all and set the value&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sub SetVariables&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dim objTempVar, objDestVar, objSourceVar, objSource&lt;BR /&gt;varValue = inputBox("Input your value")&lt;BR /&gt;varNo = ActiveDocument.GetVariableDescriptions.Count - 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For i = 0 to varNo &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If Left(ActiveDocument.GetVariableDescriptions.Item(i).Name,4) = "vSet" Then&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set objTempVar = ActiveDocument.GetVariableDescriptions.Item(i)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; varname=Trim(objTempVar.Name) &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set objSourceVar=ActiveDocument.Variables(varname) &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; varcontent=objSourceVar.GetRawContent&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set objDestVar=ActiveDocument.Variables(varname)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; objDestVar.SetContent varValue,true&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; END IF&lt;BR /&gt;Next&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;End Sub&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Jan 2015 18:36:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-value-for-mutiple-variables/m-p/775762#M275036</guid>
      <dc:creator>jzimolong</dc:creator>
      <dc:date>2015-01-12T18:36:09Z</dc:date>
    </item>
    <item>
      <title>Re: Set value for mutiple variables</title>
      <link>https://community.qlik.com/t5/QlikView/Set-value-for-mutiple-variables/m-p/775763#M275037</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't see anything wrong with multiple actions in one button...&amp;nbsp; In most cases it is better than using macros.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Jan 2015 20:37:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-value-for-mutiple-variables/m-p/775763#M275037</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-01-12T20:37:31Z</dc:date>
    </item>
    <item>
      <title>Re: Set value for mutiple variables</title>
      <link>https://community.qlik.com/t5/QlikView/Set-value-for-mutiple-variables/m-p/775764#M275038</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Since you are setting the same value you all variables you could just have the button set 1 variable and then have the other 9 variables equal that first one.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Jan 2015 20:48:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-value-for-mutiple-variables/m-p/775764#M275038</guid>
      <dc:creator>jpapador</dc:creator>
      <dc:date>2015-01-12T20:48:09Z</dc:date>
    </item>
    <item>
      <title>Re: Set value for mutiple variables</title>
      <link>https://community.qlik.com/t5/QlikView/Set-value-for-mutiple-variables/m-p/775765#M275039</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I agree, but when you have a lot of variables !! i've got a report with more then 24 variables.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jan 2015 08:14:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-value-for-mutiple-variables/m-p/775765#M275039</guid>
      <dc:creator />
      <dc:date>2015-01-13T08:14:13Z</dc:date>
    </item>
    <item>
      <title>Re: Set value for mutiple variables</title>
      <link>https://community.qlik.com/t5/QlikView/Set-value-for-mutiple-variables/m-p/775766#M275040</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;it's sounds like greate !! i'll try this &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jan 2015 08:15:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-value-for-mutiple-variables/m-p/775766#M275040</guid>
      <dc:creator />
      <dc:date>2015-01-13T08:15:34Z</dc:date>
    </item>
    <item>
      <title>Re: Set value for mutiple variables</title>
      <link>https://community.qlik.com/t5/QlikView/Set-value-for-mutiple-variables/m-p/775767#M275041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've attached my .qvw if it helps explain my solution above.&amp;nbsp; Basically, it loops through each variable in the document and assigns the same value (based on input box) to those that begin with "vSet".&amp;nbsp; You can play around with the syntax.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jan 2015 11:05:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-value-for-mutiple-variables/m-p/775767#M275041</guid>
      <dc:creator>jzimolong</dc:creator>
      <dc:date>2015-01-13T11:05:12Z</dc:date>
    </item>
    <item>
      <title>Re: Set value for mutiple variables</title>
      <link>https://community.qlik.com/t5/QlikView/Set-value-for-mutiple-variables/m-p/775768#M275042</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Joseph, but i dont need to put a value, i need to put 0 for all my variables. nothing more.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i changed you script to my needs &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks again dude&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jan 2015 11:24:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-value-for-mutiple-variables/m-p/775768#M275042</guid>
      <dc:creator />
      <dc:date>2015-01-13T11:24:44Z</dc:date>
    </item>
  </channel>
</rss>

