<?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: Problem using variable in List Box expression. in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Problem-using-variable-in-List-Box-expression/m-p/597160#M543509</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I do want to build a selection via this ListBox by which I can do select between one or more years (out of the defined list: 2014, 2015, 2016).&lt;/P&gt;&lt;P&gt;In other charts I want to use the variable in order to define a condition to switch on/of bars showing values of corresponding years.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The switching on/off I have implemented using different buttons and setting the variable within the action of these button. I now want to replace these buttons by checkboxes. therefore I switched to the approach using the ListBox.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 05 May 2014 19:02:58 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-05-05T19:02:58Z</dc:date>
    <item>
      <title>Problem using variable in List Box expression.</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-using-variable-in-List-Box-expression/m-p/597156#M543505</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="color: black; font-size: 9pt; font-family: 'Courier New';"&gt;Hi all,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="color: black; font-size: 9pt; font-family: 'Courier New';"&gt;I tried to find a solution in existing discussions but were not successful.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="color: black; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="color: black; font-size: 9pt; font-family: 'Courier New';"&gt;I have a ListBox defined containing years 2014, 2015, 2016.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="color: black; font-size: 9pt; font-family: 'Courier New';"&gt;If I use the following function:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="color: black; font-size: 9pt; font-family: 'Courier New';"&gt;= &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 9pt; font-family: 'Courier New'; color: blue;"&gt;If&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="color: black; font-size: 9pt; font-family: 'Courier New';"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 9pt; font-family: 'Courier New'; color: blue;"&gt;SubStringCount&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="color: black; font-size: 9pt; font-family: 'Courier New';"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 9pt; font-family: 'Courier New'; color: blue;"&gt;GetFieldSelections&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="color: black; font-size: 9pt; font-family: 'Courier New';"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;_year_listbox&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="color: black; font-size: 9pt; font-family: 'Courier New';"&gt;),'2014')=1,1,0)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="color: black; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="color: black; font-size: 9pt; font-family: 'Courier New';"&gt;the result is as expected, i.e. if the checkbox '2014' is marked I get a '1', of not a '0'.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="color: black; font-size: 9pt; font-family: 'Courier New';"&gt;Since I want to use the result, I want to set a variable to this '1' or '0' accordingly.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="color: black; font-size: 9pt; font-family: 'Courier New';"&gt;But if I change the expression to:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="color: black; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="color: black; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;SPAN lang="EN-US" style="color: black; font-size: 9pt; font-family: 'Courier New';"&gt;_definedvar = &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 9pt; font-family: 'Courier New'; color: blue;"&gt;If&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="color: black; font-size: 9pt; font-family: 'Courier New';"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 9pt; font-family: 'Courier New'; color: blue;"&gt;SubStringCount&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="color: black; font-size: 9pt; font-family: 'Courier New';"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 9pt; font-family: 'Courier New'; color: blue;"&gt;GetFieldSelections&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="color: black; font-size: 9pt; font-family: 'Courier New';"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;_year_listbox&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="color: black; font-size: 9pt; font-family: 'Courier New';"&gt;),'2014')=1,1,0)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the result is '1' if the 2014 checkbox is not selected and '0' if it is selected.&lt;/P&gt;&lt;P&gt;What needs to be done that the _definedvar is set to '0' or '1' depending on the 2014 checkbox?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 May 2014 18:41:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-using-variable-in-List-Box-expression/m-p/597156#M543505</guid>
      <dc:creator />
      <dc:date>2014-05-05T18:41:29Z</dc:date>
    </item>
    <item>
      <title>Re: Problem using variable in List Box expression.</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-using-variable-in-List-Box-expression/m-p/597157#M543506</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What are you trying to do? What's the goal with having this in a variable? The reason I ask, is that I suspect there is a much simpler solution...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 May 2014 18:50:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-using-variable-in-List-Box-expression/m-p/597157#M543506</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2014-05-05T18:50:04Z</dc:date>
    </item>
    <item>
      <title>Re: Problem using variable in List Box expression.</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-using-variable-in-List-Box-expression/m-p/597158#M543507</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Where / at what place do you change the expression to the above?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please note that if you use something like above in a variable definition, it might render like you observe, since QV might interpret the equal sign as a comparison operator, not as an assignment operator.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It all depends on the context, so please give some more information.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 May 2014 18:53:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-using-variable-in-List-Box-expression/m-p/597158#M543507</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2014-05-05T18:53:09Z</dc:date>
    </item>
    <item>
      <title>Re: Problem using variable in List Box expression.</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-using-variable-in-List-Box-expression/m-p/597159#M543508</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;see attachment&lt;/P&gt;&lt;P&gt;hope it helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 May 2014 18:55:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-using-variable-in-List-Box-expression/m-p/597159#M543508</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2014-05-05T18:55:56Z</dc:date>
    </item>
    <item>
      <title>Re: Problem using variable in List Box expression.</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-using-variable-in-List-Box-expression/m-p/597160#M543509</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I do want to build a selection via this ListBox by which I can do select between one or more years (out of the defined list: 2014, 2015, 2016).&lt;/P&gt;&lt;P&gt;In other charts I want to use the variable in order to define a condition to switch on/of bars showing values of corresponding years.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The switching on/off I have implemented using different buttons and setting the variable within the action of these button. I now want to replace these buttons by checkboxes. therefore I switched to the approach using the ListBox.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 May 2014 19:02:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-using-variable-in-List-Box-expression/m-p/597160#M543509</guid>
      <dc:creator />
      <dc:date>2014-05-05T19:02:58Z</dc:date>
    </item>
    <item>
      <title>Re: Problem using variable in List Box expression.</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-using-variable-in-List-Box-expression/m-p/597161#M543510</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to use the variable in a condition of a bar chart (switching on/of bars of corresponding years).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 May 2014 19:04:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-using-variable-in-List-Box-expression/m-p/597161#M543510</guid>
      <dc:creator />
      <dc:date>2014-05-05T19:04:07Z</dc:date>
    </item>
    <item>
      <title>Re: Problem using variable in List Box expression.</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-using-variable-in-List-Box-expression/m-p/597162#M543511</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sorry - I am using the personal edition, so I cannot open this qvw file.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 May 2014 19:07:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-using-variable-in-List-Box-expression/m-p/597162#M543511</guid>
      <dc:creator />
      <dc:date>2014-05-05T19:07:31Z</dc:date>
    </item>
  </channel>
</rss>

