<?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 Select values from listbox with expressions using javascript in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Select-values-from-listbox-with-expressions-using-javascript/m-p/534520#M483434</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone. I'm trying to do selection of listboxes' values from javascript.&lt;/P&gt;&lt;P&gt;First of all, I'm a newbie.&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/blush.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The current code I'm using is like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var qvDoc = Qv.GetCurrentDocument();&lt;/P&gt;&lt;P&gt;var qvListBox = qvDoc.GetObject("LB05")&lt;/P&gt;&lt;P&gt;qvListBox.QvaPublic.Data.SelectTexts(["=[FIELDNAME]='something']);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;which is working fine while I'm doing selection over a listbox with field values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem:&lt;/P&gt;&lt;P&gt;I have created listbox (let's call "LB06") where values are calculate by the expression: Day(WeekStart(MY_DATE))&amp;amp;'-'&amp;amp;Day(WeekEnd(MY_DATE))&amp;amp;' '&amp;amp;Month(MY_DATE).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Resulting values are:&lt;/P&gt;&lt;P&gt;15-21 apr&lt;/P&gt;&lt;P&gt;13-19 mag&lt;/P&gt;&lt;P&gt;20-26 mag&lt;/P&gt;&lt;P&gt;17-23 giu&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The question is: &lt;/P&gt;&lt;P&gt;While in the first case of listbox, I'm using&amp;nbsp; [FIELDNAME] to access FIELDNAME values and do the proper selection, how can I get access to values given by the expression Day(WeekStart(MY_DATE))&amp;amp;'-'&amp;amp;Day(WeekEnd(MY_DATE))&amp;amp;' '&amp;amp;Month(MY_DATE) ? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let's say, for instance, that I'd like to select &lt;STRONG&gt;15-21 apr&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A try was to access values with something like&amp;nbsp; &lt;/P&gt;&lt;P&gt;qvListBox.QvaPublic.Data.SelectTexts(["=Day(WeekStart(MY_DATE))&amp;amp;'-'&amp;amp;Day(WeekEnd(MY_DATE))&amp;amp;' '&amp;amp;Month(MY_DATE)='15-21 apr']);&lt;/P&gt;&lt;P&gt;obviously for the Object LB06&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But that's not working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since I'd like to make the proper selection on document opening, another try would be to trigger the sheet opening event (onActivateSheet) with the selection action. But in this case I also have the same problem of how to access values of a "calculated expression listbox".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 03 Jul 2013 10:09:27 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-07-03T10:09:27Z</dc:date>
    <item>
      <title>Select values from listbox with expressions using javascript</title>
      <link>https://community.qlik.com/t5/QlikView/Select-values-from-listbox-with-expressions-using-javascript/m-p/534520#M483434</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone. I'm trying to do selection of listboxes' values from javascript.&lt;/P&gt;&lt;P&gt;First of all, I'm a newbie.&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/blush.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The current code I'm using is like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var qvDoc = Qv.GetCurrentDocument();&lt;/P&gt;&lt;P&gt;var qvListBox = qvDoc.GetObject("LB05")&lt;/P&gt;&lt;P&gt;qvListBox.QvaPublic.Data.SelectTexts(["=[FIELDNAME]='something']);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;which is working fine while I'm doing selection over a listbox with field values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem:&lt;/P&gt;&lt;P&gt;I have created listbox (let's call "LB06") where values are calculate by the expression: Day(WeekStart(MY_DATE))&amp;amp;'-'&amp;amp;Day(WeekEnd(MY_DATE))&amp;amp;' '&amp;amp;Month(MY_DATE).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Resulting values are:&lt;/P&gt;&lt;P&gt;15-21 apr&lt;/P&gt;&lt;P&gt;13-19 mag&lt;/P&gt;&lt;P&gt;20-26 mag&lt;/P&gt;&lt;P&gt;17-23 giu&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The question is: &lt;/P&gt;&lt;P&gt;While in the first case of listbox, I'm using&amp;nbsp; [FIELDNAME] to access FIELDNAME values and do the proper selection, how can I get access to values given by the expression Day(WeekStart(MY_DATE))&amp;amp;'-'&amp;amp;Day(WeekEnd(MY_DATE))&amp;amp;' '&amp;amp;Month(MY_DATE) ? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let's say, for instance, that I'd like to select &lt;STRONG&gt;15-21 apr&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A try was to access values with something like&amp;nbsp; &lt;/P&gt;&lt;P&gt;qvListBox.QvaPublic.Data.SelectTexts(["=Day(WeekStart(MY_DATE))&amp;amp;'-'&amp;amp;Day(WeekEnd(MY_DATE))&amp;amp;' '&amp;amp;Month(MY_DATE)='15-21 apr']);&lt;/P&gt;&lt;P&gt;obviously for the Object LB06&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But that's not working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since I'd like to make the proper selection on document opening, another try would be to trigger the sheet opening event (onActivateSheet) with the selection action. But in this case I also have the same problem of how to access values of a "calculated expression listbox".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jul 2013 10:09:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-values-from-listbox-with-expressions-using-javascript/m-p/534520#M483434</guid>
      <dc:creator />
      <dc:date>2013-07-03T10:09:27Z</dc:date>
    </item>
  </channel>
</rss>

