<?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 Set a Document Variable with vbscript macro in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-a-Document-Variable-with-vbscript-macro/m-p/151643#M29401</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks bro,&lt;/P&gt;&lt;P&gt;It worked for me.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 19 Feb 2010 09:35:56 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-02-19T09:35:56Z</dc:date>
    <item>
      <title>Set a Document Variable with vbscript macro</title>
      <link>https://community.qlik.com/t5/QlikView/Set-a-Document-Variable-with-vbscript-macro/m-p/151641#M29399</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;I want to set three variables uid, username and pwd in my qv document.&lt;/P&gt;&lt;P&gt;User click on a button, then a macro is called and asks for User name and password.&lt;/P&gt;&lt;P&gt;When user enters these two things, then macro should extract uid from database table and set the document level variables.&lt;/P&gt;&lt;P&gt;How can i do this ?&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Feb 2010 13:20:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-a-Document-Variable-with-vbscript-macro/m-p/151641#M29399</guid>
      <dc:creator />
      <dc:date>2010-02-18T13:20:15Z</dc:date>
    </item>
    <item>
      <title>Set a Document Variable with vbscript macro</title>
      <link>https://community.qlik.com/t5/QlikView/Set-a-Document-Variable-with-vbscript-macro/m-p/151642#M29400</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There are a few different things you will need to do to implement this functionality. I would probably load the uid data in when all other data is loaded into the document. Then you don't have to worry about a partial reload when the macro runs.&lt;/P&gt;&lt;P&gt;You can set up a macro to run when the user clicks the button. In VB Script, you can use an Input Box [inputbox()] to get user input. The user input will be returned within the macro and you can use those values to populate QlikView variables. Here is a simple example:&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;Sub GetUserName&lt;BR /&gt; userNm = inputBox("Input your username")&lt;BR /&gt; ActiveDocument.Variables("vUserName").SetContent userNm, true&lt;BR /&gt;End Sub&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Then, if you have your user data loaded, you probably want to select the appropriate uid based on the inputs and the data. The method you would use here would depend on how your data is set up.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Feb 2010 15:36:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-a-Document-Variable-with-vbscript-macro/m-p/151642#M29400</guid>
      <dc:creator />
      <dc:date>2010-02-18T15:36:06Z</dc:date>
    </item>
    <item>
      <title>Set a Document Variable with vbscript macro</title>
      <link>https://community.qlik.com/t5/QlikView/Set-a-Document-Variable-with-vbscript-macro/m-p/151643#M29401</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks bro,&lt;/P&gt;&lt;P&gt;It worked for me.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Feb 2010 09:35:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-a-Document-Variable-with-vbscript-macro/m-p/151643#M29401</guid>
      <dc:creator />
      <dc:date>2010-02-19T09:35:56Z</dc:date>
    </item>
  </channel>
</rss>

