<?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: Assign a variable from a text box in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Assign-a-variable-from-a-text-box/m-p/949060#M326628</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Jesse,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;why not try using a input box to set the variable value instead? Check out the QV help file for further information&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH Andy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 06 Nov 2015 11:37:03 GMT</pubDate>
    <dc:creator>awhitfield</dc:creator>
    <dc:date>2015-11-06T11:37:03Z</dc:date>
    <item>
      <title>Assign a variable from a text box</title>
      <link>https://community.qlik.com/t5/QlikView/Assign-a-variable-from-a-text-box/m-p/949057#M326625</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Qlikviewers! It's possible that this may require a macro, which I am open to doing (though would prefer not to), but I am wondering how I might go about assigning a variable based on the content of a text box. I would like to have a variable that is equal to whatever text is in a certain text box. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've attached an example app. &lt;/P&gt;&lt;P&gt;Here's the macro I made:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;sub GetTextBoxValue()&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;set obj1 = ActiveDocument.GetSheetObject("TX02")&lt;/P&gt;
&lt;P&gt;set txtbx = obj1.getTextValue&lt;/P&gt;
&lt;P&gt;set txtbx = ActiveDocument.Variables("vTextBox")&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;end sub&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Nov 2015 00:27:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Assign-a-variable-from-a-text-box/m-p/949057#M326625</guid>
      <dc:creator />
      <dc:date>2015-11-06T00:27:54Z</dc:date>
    </item>
    <item>
      <title>Re: Assign a variable from a text box</title>
      <link>https://community.qlik.com/t5/QlikView/Assign-a-variable-from-a-text-box/m-p/949058#M326626</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I should add that the goal here is not to transfer text from one box to another, but to actually get the variable assigned&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Nov 2015 00:29:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Assign-a-variable-from-a-text-box/m-p/949058#M326626</guid>
      <dc:creator />
      <dc:date>2015-11-06T00:29:23Z</dc:date>
    </item>
    <item>
      <title>Re: Assign a variable from a text box</title>
      <link>https://community.qlik.com/t5/QlikView/Assign-a-variable-from-a-text-box/m-p/949059#M326627</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well I figured it out with a macro after a couple hours of trial and error.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;See attached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The macro you need is&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;sub CommentVars&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;set dotextbox = ActiveDocument.GetSheetObject( "TX02" )&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;set dovartext = ActiveDocument.Variables("vTextBox")&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;for RowIter = 0 to dotextbox.GetRowCount-1&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for ColIter =0 to dotextbox.GetColumnCount-1&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set cell1 = dotextbox.GetCell(RowIter,ColIter)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dovartext.SetContent cell1.Text, TRUE&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; next &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;next&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;end sub&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Nov 2015 04:59:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Assign-a-variable-from-a-text-box/m-p/949059#M326627</guid>
      <dc:creator />
      <dc:date>2015-11-06T04:59:06Z</dc:date>
    </item>
    <item>
      <title>Re: Assign a variable from a text box</title>
      <link>https://community.qlik.com/t5/QlikView/Assign-a-variable-from-a-text-box/m-p/949060#M326628</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Jesse,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;why not try using a input box to set the variable value instead? Check out the QV help file for further information&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH Andy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Nov 2015 11:37:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Assign-a-variable-from-a-text-box/m-p/949060#M326628</guid>
      <dc:creator>awhitfield</dc:creator>
      <dc:date>2015-11-06T11:37:03Z</dc:date>
    </item>
    <item>
      <title>Re: Assign a variable from a text box</title>
      <link>https://community.qlik.com/t5/QlikView/Assign-a-variable-from-a-text-box/m-p/949061#M326629</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's a much more elegant solution. Unfortunately, there's two things preventing this&lt;/P&gt;&lt;P&gt;- The text box has formatting that needs to be displayed in the QVW and transfered to the variable (ie newlines)&lt;/P&gt;&lt;P&gt;- The text box content is different depending on a filter selection&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Nov 2015 18:25:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Assign-a-variable-from-a-text-box/m-p/949061#M326629</guid>
      <dc:creator />
      <dc:date>2015-11-06T18:25:41Z</dc:date>
    </item>
  </channel>
</rss>

