<?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 the value of a variable when selecting a value in a Listbox in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-the-value-of-a-variable-when-selecting-a-value-in-a-Listbox/m-p/225778#M78045</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I am a little confused. The expression calculates a value when you change the selection in a list box. Where does the input box come into this?&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 05 Oct 2010 13:04:31 GMT</pubDate>
    <dc:creator>jonathandienst</dc:creator>
    <dc:date>2010-10-05T13:04:31Z</dc:date>
    <item>
      <title>Set the value of a variable when selecting a value in a Listbox</title>
      <link>https://community.qlik.com/t5/QlikView/Set-the-value-of-a-variable-when-selecting-a-value-in-a-Listbox/m-p/225773#M78040</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'd like to set the value of the Currency named variable to €, when the value in a ListBox changes to 'Consolidation'. Is this possible to perform with a Macro? I have tried with Sheet Object Event Trigger "Set Variable", but it changes the variable to € whatever value I select in the List Box.&lt;/P&gt;&lt;P&gt;Any idea will be appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Oct 2010 14:42:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-the-value-of-a-variable-when-selecting-a-value-in-a-Listbox/m-p/225773#M78040</guid>
      <dc:creator>salto</dc:creator>
      <dc:date>2010-10-01T14:42:19Z</dc:date>
    </item>
    <item>
      <title>Set the value of a variable when selecting a value in a Listbox</title>
      <link>https://community.qlik.com/t5/QlikView/Set-the-value-of-a-variable-when-selecting-a-value-in-a-Listbox/m-p/225774#M78041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Rather than using a macro or trigger, I suggest that you use an expression in the variable. Something like:&lt;/P&gt;&lt;P&gt;=If(only(field1) = 'Consolidation,'€', '$')&lt;/P&gt;&lt;P&gt;Change field1 to match your model.&lt;/P&gt;&lt;P&gt;This should work as long as only one value for field1 is selected. If multiple values are allowed, you could use GetFieldSelections instead.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Oct 2010 15:00:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-the-value-of-a-variable-when-selecting-a-value-in-a-Listbox/m-p/225774#M78041</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2010-10-01T15:00:04Z</dc:date>
    </item>
    <item>
      <title>Set the value of a variable when selecting a value in a Listbox</title>
      <link>https://community.qlik.com/t5/QlikView/Set-the-value-of-a-variable-when-selecting-a-value-in-a-Listbox/m-p/225775#M78042</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Jonathan, sorry for the delay. Where should I use the expression for the variable?&lt;/P&gt;&lt;P&gt;I have tried by writing the expression you provided in the variable definition for the document (Document Properties -&amp;gt; Variables). But no luck, the behaviour is not the expected one, because the Currency variable does not change when I change the selection in the ListBox (from Consolidation to No Consolidation and viceversa).&lt;/P&gt;&lt;P&gt;I'll keep on trying...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Oct 2010 10:30:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-the-value-of-a-variable-when-selecting-a-value-in-a-Listbox/m-p/225775#M78042</guid>
      <dc:creator>salto</dc:creator>
      <dc:date>2010-10-05T10:30:10Z</dc:date>
    </item>
    <item>
      <title>Set the value of a variable when selecting a value in a Listbox</title>
      <link>https://community.qlik.com/t5/QlikView/Set-the-value-of-a-variable-when-selecting-a-value-in-a-Listbox/m-p/225776#M78043</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I suggest that you first test the expression in a text box. Assuming that the expression variable has a leading '=' sign, as per my post, then put &lt;B&gt;=vCurrencySymbol&lt;/B&gt; into the text box Then check whether the expression is working correctly.&lt;/P&gt;&lt;P&gt;(If you define the variable without a leading '=', then you can define the text box &lt;B&gt;=$(vCurrencySymbol)&lt;/B&gt;)&lt;/P&gt;&lt;P&gt;Once the expression works correctly, you can use it wherever you need the currency symbol.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;P&gt;PS - if you cannot get the expression to work, I suggest that you post your model so that we can look at this more closely.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Oct 2010 10:53:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-the-value-of-a-variable-when-selecting-a-value-in-a-Listbox/m-p/225776#M78043</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2010-10-05T10:53:56Z</dc:date>
    </item>
    <item>
      <title>Set the value of a variable when selecting a value in a Listbox</title>
      <link>https://community.qlik.com/t5/QlikView/Set-the-value-of-a-variable-when-selecting-a-value-in-a-Listbox/m-p/225777#M78044</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Jonathan,&lt;/P&gt;&lt;P&gt;the expression works perfectly in the textbox: it shows $ or €. But the variable in the inputbox does not change. Should I set up the variable in the load script?&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Oct 2010 11:29:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-the-value-of-a-variable-when-selecting-a-value-in-a-Listbox/m-p/225777#M78044</guid>
      <dc:creator>salto</dc:creator>
      <dc:date>2010-10-05T11:29:36Z</dc:date>
    </item>
    <item>
      <title>Set the value of a variable when selecting a value in a Listbox</title>
      <link>https://community.qlik.com/t5/QlikView/Set-the-value-of-a-variable-when-selecting-a-value-in-a-Listbox/m-p/225778#M78045</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I am a little confused. The expression calculates a value when you change the selection in a list box. Where does the input box come into this?&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Oct 2010 13:04:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-the-value-of-a-variable-when-selecting-a-value-in-a-Listbox/m-p/225778#M78045</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2010-10-05T13:04:31Z</dc:date>
    </item>
    <item>
      <title>Set the value of a variable when selecting a value in a Listbox</title>
      <link>https://community.qlik.com/t5/QlikView/Set-the-value-of-a-variable-when-selecting-a-value-in-a-Listbox/m-p/225779#M78046</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry, it has been my fault: the variable is used in an input box to select the currency in which the sales amounts have to be shown.&lt;/P&gt;&lt;P&gt;The goal is to make the currency value to be € (and never $) when the "Consolidation" value is selected in the listbox.&lt;/P&gt;&lt;P&gt;I apologize for not explaining myself clearly.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Oct 2010 14:33:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-the-value-of-a-variable-when-selecting-a-value-in-a-Listbox/m-p/225779#M78046</guid>
      <dc:creator>salto</dc:creator>
      <dc:date>2010-10-05T14:33:29Z</dc:date>
    </item>
    <item>
      <title>Set the value of a variable when selecting a value in a Listbox</title>
      <link>https://community.qlik.com/t5/QlikView/Set-the-value-of-a-variable-when-selecting-a-value-in-a-Listbox/m-p/225780#M78047</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK that explains it.&lt;/P&gt;&lt;P&gt;Yes, you were right about needinga trigger - you will need to an OnSelect field event trigger. Use a Set Variable action and put the variable that should contain the currency symbol in the Variable box and enter the expression &lt;B&gt;=If(only(field1) = 'Consolidation,'€', '$')&lt;/B&gt; in the Value box.&lt;/P&gt;&lt;P&gt;(Obviously with the correct field name in place of field1).&lt;/P&gt;&lt;P&gt;Remember that this expression only works if only one value is selected in &lt;B&gt;field1&lt;/B&gt;.&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Oct 2010 14:57:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-the-value-of-a-variable-when-selecting-a-value-in-a-Listbox/m-p/225780#M78047</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2010-10-05T14:57:32Z</dc:date>
    </item>
    <item>
      <title>Set the value of a variable when selecting a value in a Listbox</title>
      <link>https://community.qlik.com/t5/QlikView/Set-the-value-of-a-variable-when-selecting-a-value-in-a-Listbox/m-p/225781#M78048</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That did the trick. Many thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Oct 2010 17:35:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-the-value-of-a-variable-when-selecting-a-value-in-a-Listbox/m-p/225781#M78048</guid>
      <dc:creator>salto</dc:creator>
      <dc:date>2010-10-05T17:35:46Z</dc:date>
    </item>
  </channel>
</rss>

