<?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: Is it possible to create a document variable using vbs? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Is-it-possible-to-create-a-document-variable-using-vbs/m-p/2483299#M1226128</link>
    <description>&lt;P&gt;For what it's worth, here's the standard bit of code I use in my QV Modules for setting, getting and creating Variables.&lt;/P&gt;
&lt;PRE class="p1"&gt;Rem *** Returns a Variables content as String&lt;BR /&gt;Function GetVariableString(varname)&lt;BR /&gt;  GetVariableString = GetVariable(varname).GetContent.String&lt;BR /&gt;End Function&lt;BR /&gt;&lt;BR /&gt;Rem ** Gets a variable and creates it if it doesn't exist&lt;BR /&gt;Function GetVariable(varname)&lt;BR /&gt;  If typename(ActiveDocument.GetVariable(varname)) &amp;lt;&amp;gt; "Variable" Then&lt;BR /&gt;    ActiveDocument.CreateVariable(varname) &lt;BR /&gt;    ActiveDocument.GetVariable(varname).SetContent "", True&lt;BR /&gt;  End If&lt;BR /&gt;  Set GetVariable = ActiveDocument.GetVariable(varname)&lt;BR /&gt;End Function ' GetVariable&lt;BR /&gt;&lt;BR /&gt;Rem ** Sets a Variable's value&lt;BR /&gt;Sub SetVariable(varname, value)&lt;BR /&gt;  GetVariable(varname).SetContent value, &lt;SPAN class="s1"&gt;False&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="s1"&gt;End&lt;/SPAN&gt; &lt;SPAN class="s1"&gt;Sub&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P class="p1"&gt;-Rob&lt;BR /&gt;&lt;A href="http://www.easyqlik.com" target="_blank"&gt;http://www.easyqlik.com&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://masterssummit.com" target="_blank"&gt;http://masterssummit.com&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://qlikviewcookbook.com" target="_blank"&gt;http://qlikviewcookbook.com&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 24 Sep 2024 15:25:29 GMT</pubDate>
    <dc:creator>rwunderlich</dc:creator>
    <dc:date>2024-09-24T15:25:29Z</dc:date>
    <item>
      <title>Is it possible to create a document variable using vbs?</title>
      <link>https://community.qlik.com/t5/QlikView/Is-it-possible-to-create-a-document-variable-using-vbs/m-p/2483001#M1226122</link>
      <description>&lt;P&gt;If yes, then how?&amp;nbsp;Need something like this:&lt;/P&gt;
&lt;P&gt;ActiveDocument.Variables.Create("myNewVariable")&lt;/P&gt;</description>
      <pubDate>Mon, 23 Sep 2024 11:29:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Is-it-possible-to-create-a-document-variable-using-vbs/m-p/2483001#M1226122</guid>
      <dc:creator>NikVladi</dc:creator>
      <dc:date>2024-09-23T11:29:49Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to create a document variable using vbs?</title>
      <link>https://community.qlik.com/t5/QlikView/Is-it-possible-to-create-a-document-variable-using-vbs/m-p/2483083#M1226123</link>
      <description>&lt;P&gt;ActiveDocument.CreateVariable("MyVariable")&lt;/P&gt;
&lt;P&gt;&lt;A href="https://help.qlik.com/en-US/qlikview-developer/May2024/Subsystems/Automation/Content/QV_Automation/APIGuide/QlikViewComApiGuide.zip" target="_blank"&gt;https://help.qlik.com/en-US/qlikview-developer/May2024/Subsystems/Automation/Content/QV_Automation/APIGuide/QlikViewComApiGuide.zip&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Sep 2024 23:36:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Is-it-possible-to-create-a-document-variable-using-vbs/m-p/2483083#M1226123</guid>
      <dc:creator>NikVladi</dc:creator>
      <dc:date>2024-09-23T23:36:01Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to create a document variable using vbs?</title>
      <link>https://community.qlik.com/t5/QlikView/Is-it-possible-to-create-a-document-variable-using-vbs/m-p/2483299#M1226128</link>
      <description>&lt;P&gt;For what it's worth, here's the standard bit of code I use in my QV Modules for setting, getting and creating Variables.&lt;/P&gt;
&lt;PRE class="p1"&gt;Rem *** Returns a Variables content as String&lt;BR /&gt;Function GetVariableString(varname)&lt;BR /&gt;  GetVariableString = GetVariable(varname).GetContent.String&lt;BR /&gt;End Function&lt;BR /&gt;&lt;BR /&gt;Rem ** Gets a variable and creates it if it doesn't exist&lt;BR /&gt;Function GetVariable(varname)&lt;BR /&gt;  If typename(ActiveDocument.GetVariable(varname)) &amp;lt;&amp;gt; "Variable" Then&lt;BR /&gt;    ActiveDocument.CreateVariable(varname) &lt;BR /&gt;    ActiveDocument.GetVariable(varname).SetContent "", True&lt;BR /&gt;  End If&lt;BR /&gt;  Set GetVariable = ActiveDocument.GetVariable(varname)&lt;BR /&gt;End Function ' GetVariable&lt;BR /&gt;&lt;BR /&gt;Rem ** Sets a Variable's value&lt;BR /&gt;Sub SetVariable(varname, value)&lt;BR /&gt;  GetVariable(varname).SetContent value, &lt;SPAN class="s1"&gt;False&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="s1"&gt;End&lt;/SPAN&gt; &lt;SPAN class="s1"&gt;Sub&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P class="p1"&gt;-Rob&lt;BR /&gt;&lt;A href="http://www.easyqlik.com" target="_blank"&gt;http://www.easyqlik.com&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://masterssummit.com" target="_blank"&gt;http://masterssummit.com&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://qlikviewcookbook.com" target="_blank"&gt;http://qlikviewcookbook.com&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Sep 2024 15:25:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Is-it-possible-to-create-a-document-variable-using-vbs/m-p/2483299#M1226128</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2024-09-24T15:25:29Z</dc:date>
    </item>
  </channel>
</rss>

