<?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 of expression to a variable, not the expression itself? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-value-of-expression-to-a-variable-not-the-expression-itself/m-p/279419#M1191695</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That works perfectly thank you everyone for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 Aug 2011 17:20:33 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-08-17T17:20:33Z</dc:date>
    <item>
      <title>Set value of expression to a variable, not the expression itself?</title>
      <link>https://community.qlik.com/t5/QlikView/Set-value-of-expression-to-a-variable-not-the-expression-itself/m-p/279410#M1191686</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="min-height: 8pt; height: 8pt;"&gt;I am trying to use an action of a button (due to not knowing or really understanding VB, and the fact that macros do not work in webview)&amp;nbsp; to set getfeildselections() to a variable. I want the VALUE of the current selection saved, and not the formula for getfieldselections()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the button click action as set variable intercompany to getcurrentselection(custid)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I click the button then check the variable screen, the variable intercompany says:getcurrentselection(custid)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since the variable is set to the expression getcurrentselection(custid) and not the value of getcurrentselection(custid) it is changing the variable based on the selection instead of leaving it set to the selection on button click.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I get this to set the value of the expression, and not the expression itself?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Aug 2011 14:17:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-value-of-expression-to-a-variable-not-the-expression-itself/m-p/279410#M1191686</guid>
      <dc:creator />
      <dc:date>2011-08-17T14:17:10Z</dc:date>
    </item>
    <item>
      <title>Re: Set value of expression to a variable, not the expression itself?</title>
      <link>https://community.qlik.com/t5/QlikView/Set-value-of-expression-to-a-variable-not-the-expression-itself/m-p/279411#M1191687</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;BR /&gt;See the variable settings and button actions on the attached sample qvw.&lt;BR /&gt;I hope it helps you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Aug 2011 14:46:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-value-of-expression-to-a-variable-not-the-expression-itself/m-p/279411#M1191687</guid>
      <dc:creator>jykang0638</dc:creator>
      <dc:date>2011-08-17T14:46:47Z</dc:date>
    </item>
    <item>
      <title>Re: Set value of expression to a variable, not the expression itself?</title>
      <link>https://community.qlik.com/t5/QlikView/Set-value-of-expression-to-a-variable-not-the-expression-itself/m-p/279412#M1191688</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am on personal edition so I can not open your sample.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Aug 2011 14:50:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-value-of-expression-to-a-variable-not-the-expression-itself/m-p/279412#M1191688</guid>
      <dc:creator />
      <dc:date>2011-08-17T14:50:32Z</dc:date>
    </item>
    <item>
      <title>Re: Set value of expression to a variable, not the expression itself?</title>
      <link>https://community.qlik.com/t5/QlikView/Set-value-of-expression-to-a-variable-not-the-expression-itself/m-p/279413#M1191689</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In button action -&amp;gt; Add -&amp;gt; External -&amp;gt; Set variable&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now in varaible textbox give your variablename &amp;amp; in value keep this code...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=GetFieldSelections(custid,',',100)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Then the variable holds the 100 selections of listbox. If you don't give the size then by default the GetFieldSelections method allows you to select only 6 selected values.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Aug 2011 14:56:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-value-of-expression-to-a-variable-not-the-expression-itself/m-p/279413#M1191689</guid>
      <dc:creator>jagannalla</dc:creator>
      <dc:date>2011-08-17T14:56:48Z</dc:date>
    </item>
    <item>
      <title>Re: Set value of expression to a variable, not the expression itself?</title>
      <link>https://community.qlik.com/t5/QlikView/Set-value-of-expression-to-a-variable-not-the-expression-itself/m-p/279414#M1191690</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I already have the variable set, my issue is that it is being set with the expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;variable='GetFieldSelections(custid,',',100)'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when I want the results of the above:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;variable='Not Cust1,Cust2,Cust3'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How it currently is, the variable is changing with the selection, where I want it to record the actual selected/not selected fields at the time of button click.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edit:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Never mind, I see that when adding the = sign before, it is records the values. My test listbox that is showing me what the variable held was malfunctioning. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is now recording the value of the selection, but now a new issue has apperared. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What the button is actually doing is it is selecting all internal Customer ID's (Internal company selling to another internal company). It is then selecting all excluded values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is where I am telling it to record the value of the excluded custid's to the variable. Now that it is working, I see that it is recording the value before the previous actions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So when no selections are made and I click the button, it records an empty string.&lt;/P&gt;&lt;P&gt;If I click the button a second time, then it records the correct value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas how to get around this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Aug 2011 15:01:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-value-of-expression-to-a-variable-not-the-expression-itself/m-p/279414#M1191690</guid>
      <dc:creator />
      <dc:date>2011-08-17T15:01:29Z</dc:date>
    </item>
    <item>
      <title>Re: Set value of expression to a variable, not the expression itself?</title>
      <link>https://community.qlik.com/t5/QlikView/Set-value-of-expression-to-a-variable-not-the-expression-itself/m-p/279415#M1191691</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok then can you send what field and expression are you using in&amp;nbsp; the listbox...&lt;/P&gt;&lt;P&gt;For Eg:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the listbox...Field is &lt;STRONG&gt;A &lt;/STRONG&gt;and the expressiong is &lt;STRONG&gt;B &lt;/STRONG&gt;like this if your listbox looks and data of this fields are:&lt;/P&gt;&lt;P&gt;Load * inline&lt;/P&gt;&lt;P&gt;[&lt;/P&gt;&lt;P&gt;A,B&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;x,y&lt;/P&gt;&lt;P&gt;w,z&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; then try in the variable value like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if(wildmatch(GetFieldSelections(A,'',50),'*x*'),min({&amp;lt;A= {'*x*'}&amp;gt;}B),'')&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Aug 2011 15:17:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-value-of-expression-to-a-variable-not-the-expression-itself/m-p/279415#M1191691</guid>
      <dc:creator>jagannalla</dc:creator>
      <dc:date>2011-08-17T15:17:04Z</dc:date>
    </item>
    <item>
      <title>Re: Set value of expression to a variable, not the expression itself?</title>
      <link>https://community.qlik.com/t5/QlikView/Set-value-of-expression-to-a-variable-not-the-expression-itself/m-p/279416#M1191692</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; You have to set like the below: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;leave the definition of your variable space&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In button action - Add - External - Set variable&lt;BR /&gt;In Variavble Textbox, input your variable&lt;/P&gt;&lt;P&gt;IN Value Textbox, input =GetFieldSelections(custid) &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Aug 2011 15:18:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-value-of-expression-to-a-variable-not-the-expression-itself/m-p/279416#M1191692</guid>
      <dc:creator>jykang0638</dc:creator>
      <dc:date>2011-08-17T15:18:03Z</dc:date>
    </item>
    <item>
      <title>Re: Set value of expression to a variable, not the expression itself?</title>
      <link>https://community.qlik.com/t5/QlikView/Set-value-of-expression-to-a-variable-not-the-expression-itself/m-p/279417#M1191693</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am not exactly sure what you are asking?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;List box is set to an expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;='$(intercompany)'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where intercompany is the variable being set by the button.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It just appears that the action Set variable is executing before the selections are actualy made.&lt;/P&gt;&lt;P&gt;I figured that according to the following image, it would do all the actions in order. Select (cust1|cust2|cust3). Then select excluded custid which changes the selection text to (Not cust1,cust2,cust3) which would then record this into the variable.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="var.JPG" class="jive-image-thumbnail jive-image" onclick="" src="https://community.qlik.com/legacyfs/online/6564_var.JPG" width="450" /&gt;&lt;/P&gt;&lt;P&gt;However it is not doing that, and when the qvw has no current selections, it is recording '' to the variable, and then setting the selections&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Aug 2011 15:27:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-value-of-expression-to-a-variable-not-the-expression-itself/m-p/279417#M1191693</guid>
      <dc:creator />
      <dc:date>2011-08-17T15:27:19Z</dc:date>
    </item>
    <item>
      <title>Re: Set value of expression to a variable, not the expression itself?</title>
      <link>https://community.qlik.com/t5/QlikView/Set-value-of-expression-to-a-variable-not-the-expression-itself/m-p/279418#M1191694</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; I have tested the below and it is working.&lt;BR /&gt;You need two variables.&lt;BR /&gt;Let use vSelectedRecord for recording and vSpare for checking field selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In button actions - Add - External - Set variable&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Variavle: vSpare, Value: =if(vSpare, 0, 1)&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;In Document Properties - Triggers - Variable Event Triggers&lt;BR /&gt;Select 'vSpare' as variable, then add two events - Select Excluded and Select Possible in the OnInput event.&lt;BR /&gt;And then add Set Variable action like the below in the OnChange event.&lt;BR /&gt;&lt;STRONG&gt;Variavle: vSelectedRecord, Value: =getFieldSelections(custid,',',100)&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;I hope it helps you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Aug 2011 16:19:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-value-of-expression-to-a-variable-not-the-expression-itself/m-p/279418#M1191694</guid>
      <dc:creator>jykang0638</dc:creator>
      <dc:date>2011-08-17T16:19:45Z</dc:date>
    </item>
    <item>
      <title>Re: Set value of expression to a variable, not the expression itself?</title>
      <link>https://community.qlik.com/t5/QlikView/Set-value-of-expression-to-a-variable-not-the-expression-itself/m-p/279419#M1191695</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That works perfectly thank you everyone for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Aug 2011 17:20:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-value-of-expression-to-a-variable-not-the-expression-itself/m-p/279419#M1191695</guid>
      <dc:creator />
      <dc:date>2011-08-17T17:20:33Z</dc:date>
    </item>
    <item>
      <title>Re: Set value of expression to a variable, not the expression itself?</title>
      <link>https://community.qlik.com/t5/QlikView/Set-value-of-expression-to-a-variable-not-the-expression-itself/m-p/279420#M1191696</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK New issue. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This works perfectly in the desktop, but if this is running in Webview, then nothing is working with the button, no color change, and no selections.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Aug 2011 18:39:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-value-of-expression-to-a-variable-not-the-expression-itself/m-p/279420#M1191696</guid>
      <dc:creator />
      <dc:date>2011-08-17T18:39:58Z</dc:date>
    </item>
    <item>
      <title>Re: Set value of expression to a variable, not the expression itself?</title>
      <link>https://community.qlik.com/t5/QlikView/Set-value-of-expression-to-a-variable-not-the-expression-itself/m-p/279421#M1191697</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This was what i was searching for, but i needed to store text values into the variable. I managed to do that by using this expression in the value field of the set variable function on a button &lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;chr&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(39) &amp;amp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;GetFieldSelections&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[MyField]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &amp;amp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;chr&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(39) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Jun 2017 08:46:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-value-of-expression-to-a-variable-not-the-expression-itself/m-p/279421#M1191697</guid>
      <dc:creator>timoheideman</dc:creator>
      <dc:date>2017-06-15T08:46:15Z</dc:date>
    </item>
  </channel>
</rss>

