<?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 Help with Selected Values code in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Help-with-Selected-Values-code/m-p/209764#M64632</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the information. At least I know its not something I'm doing wrong.&lt;/P&gt;&lt;P&gt;I couldn't get x.value to work - but I did find a work-around using ToggleSelect. I'm all set for now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sally&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 20 Nov 2009 04:38:08 GMT</pubDate>
    <dc:creator />
    <dc:date>2009-11-20T04:38:08Z</dc:date>
    <item>
      <title>Help with Selected Values code</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Selected-Values-code/m-p/209760#M64628</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a requirement to load a table of filter values into a listbox from a spreadsheet these are in a seperate table with no common fields so isnt linked this is deliberate. These are all selected and loaded into an array with the code below (sf). I then want to set the Array contents as the current filter for another Listbox where %Key is linked to other objects. this should then filter all objects to the selected %key value. but the code isnt working !&lt;/P&gt;&lt;P&gt;The line thats Failing is below : is SelectValues supported in version 8.5 Or can someone point me towards my coding error ?&lt;/P&gt;&lt;P&gt;doc.Fields("%key").SelectValues sf&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;PRE&gt;&lt;/PRE&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;set doc = ActiveDocument&lt;BR /&gt; set myselections = doc.fields("TerritoryID").GetSelectedValues&lt;BR /&gt; &lt;BR /&gt; set sf = doc.fields("%key").GetNoValues&lt;BR /&gt; for i = 0 to myselections.count -1&lt;BR /&gt; 'msgbox (myselections.Item(i).text)&lt;BR /&gt; sf.Add&lt;BR /&gt; sf(i).Text = myselections.Item(i).text&lt;BR /&gt; sf(i).isNumeric = true&lt;BR /&gt; msgbox (sf(i).Text)&lt;BR /&gt; &lt;BR /&gt; next&lt;BR /&gt; &lt;BR /&gt; 'doc.Fields("%key").select sf(0).Text 'this works but its only a single value&lt;BR /&gt; doc.Fields("%key").SelectValues sf 'This is the line that isnt working &lt;BR /&gt;end Sub &lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Oct 2009 21:50:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Selected-Values-code/m-p/209760#M64628</guid>
      <dc:creator />
      <dc:date>2009-10-07T21:50:34Z</dc:date>
    </item>
    <item>
      <title>Help with Selected Values code</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Selected-Values-code/m-p/209761#M64629</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;here is a simpler code example but it is still not working ...&lt;/P&gt;&lt;P&gt;sub setFields&lt;BR /&gt;set doc = ActiveDocument&lt;BR /&gt;set fld = doc.fields("%key")&lt;BR /&gt;set x = fld.GetNoValues&lt;BR /&gt;x.Add&lt;BR /&gt;x.add&lt;BR /&gt;x.add&lt;BR /&gt;x(0).text = 1&lt;BR /&gt;x(1).Text = 2&lt;BR /&gt;x(2).Text = 3&lt;BR /&gt;ActiveDocument.fields("%key").SelectValues x&lt;BR /&gt;end sub&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Oct 2009 22:28:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Selected-Values-code/m-p/209761#M64629</guid>
      <dc:creator />
      <dc:date>2009-10-07T22:28:32Z</dc:date>
    </item>
    <item>
      <title>Help with Selected Values code</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Selected-Values-code/m-p/209762#M64630</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you ever get an answer to this? I am running into the same problem. If the text is numeric, its fine. But as soon as its numeric, nothing that I put in the SelectValues sticks. I get no errors, it seems to be happy. I can see the values in the "x" array, but it never gets put into the field selection.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Nov 2009 03:40:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Selected-Values-code/m-p/209762#M64630</guid>
      <dc:creator />
      <dc:date>2009-11-20T03:40:38Z</dc:date>
    </item>
    <item>
      <title>Help with Selected Values code</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Selected-Values-code/m-p/209763#M64631</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I did get it working, but i believe its a workaround to a bug in the product.&lt;/P&gt;&lt;P&gt;when you populate the array value you have to set both properties for x.text and x.value&lt;/P&gt;&lt;P&gt;I dont have the qvw handy this evening but i can check it if the above solution doesnt work&lt;/P&gt;&lt;P&gt;ColinR&lt;/P&gt;&lt;P&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>Fri, 20 Nov 2009 04:12:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Selected-Values-code/m-p/209763#M64631</guid>
      <dc:creator />
      <dc:date>2009-11-20T04:12:23Z</dc:date>
    </item>
    <item>
      <title>Help with Selected Values code</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Selected-Values-code/m-p/209764#M64632</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the information. At least I know its not something I'm doing wrong.&lt;/P&gt;&lt;P&gt;I couldn't get x.value to work - but I did find a work-around using ToggleSelect. I'm all set for now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sally&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Nov 2009 04:38:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Selected-Values-code/m-p/209764#M64632</guid>
      <dc:creator />
      <dc:date>2009-11-20T04:38:08Z</dc:date>
    </item>
  </channel>
</rss>

