<?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 GetRelevantSelections - returning selections from other object! in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/GetRelevantSelections-returning-selections-from-other-object/m-p/158881#M33746</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to form a text string based on multiple selections from a listbox. Here is the code -&lt;/P&gt;&lt;P&gt;sub assignUsers&lt;BR /&gt;set obj = ActiveDocument.GetSheetObject("LB25")&lt;BR /&gt;xusers=obj.GetRelevantSelections&lt;BR /&gt;if ActiveDocument.GetSheetObject("LB25").GetField.GetFieldFlags.HasSelection then&lt;BR /&gt; msgbox(xusers(0))&lt;BR /&gt; ActiveDocument.Variables("requestUser").SetContent right( xusers(0), len(xusers(0))- 9 ), true&lt;BR /&gt;else&lt;BR /&gt; ActiveDocument.Variables("requestUser").SetContent "No users selected", true&lt;BR /&gt;end if&lt;BR /&gt;end sub&lt;/P&gt;&lt;P&gt;Srangely, what gets into 'xusers' is selection from one of my other listboxes - LB22! I verified this by inserting a msgbox statement.&lt;/P&gt;&lt;P&gt;Could somebody pl help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 12 Aug 2010 18:46:23 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-08-12T18:46:23Z</dc:date>
    <item>
      <title>GetRelevantSelections - returning selections from other object!</title>
      <link>https://community.qlik.com/t5/QlikView/GetRelevantSelections-returning-selections-from-other-object/m-p/158881#M33746</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to form a text string based on multiple selections from a listbox. Here is the code -&lt;/P&gt;&lt;P&gt;sub assignUsers&lt;BR /&gt;set obj = ActiveDocument.GetSheetObject("LB25")&lt;BR /&gt;xusers=obj.GetRelevantSelections&lt;BR /&gt;if ActiveDocument.GetSheetObject("LB25").GetField.GetFieldFlags.HasSelection then&lt;BR /&gt; msgbox(xusers(0))&lt;BR /&gt; ActiveDocument.Variables("requestUser").SetContent right( xusers(0), len(xusers(0))- 9 ), true&lt;BR /&gt;else&lt;BR /&gt; ActiveDocument.Variables("requestUser").SetContent "No users selected", true&lt;BR /&gt;end if&lt;BR /&gt;end sub&lt;/P&gt;&lt;P&gt;Srangely, what gets into 'xusers' is selection from one of my other listboxes - LB22! I verified this by inserting a msgbox statement.&lt;/P&gt;&lt;P&gt;Could somebody pl help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Aug 2010 18:46:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/GetRelevantSelections-returning-selections-from-other-object/m-p/158881#M33746</guid>
      <dc:creator />
      <dc:date>2010-08-12T18:46:23Z</dc:date>
    </item>
    <item>
      <title>GetRelevantSelections - returning selections from other object!</title>
      <link>https://community.qlik.com/t5/QlikView/GetRelevantSelections-returning-selections-from-other-object/m-p/158882#M33747</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;found the cause. i was assuming that the selection i want would always be at the first spot in xusers array. i modified the code -&lt;/P&gt;&lt;P&gt;sub assignUsers&lt;BR /&gt;set obj = ActiveDocument.GetSheetObject("LB25")&lt;BR /&gt;xusers=obj.GetRelevantSelections&lt;BR /&gt;if ActiveDocument.GetSheetObject("LB25").GetField.GetFieldFlags.HasSelection then&lt;BR /&gt; for i = lbound(xusers) to ubound(xusers)&lt;BR /&gt; if (left(xusers(i),11)="reqUserName") then&lt;BR /&gt; msgbox(xusers(i))&lt;BR /&gt; ActiveDocument.Variables("requestUser").SetContent right( xusers(i), len(xusers(i))- 11 ), true&lt;BR /&gt; end if&lt;BR /&gt; next&lt;BR /&gt;else&lt;BR /&gt; ActiveDocument.Variables("requestUser").SetContent "No users selected", true&lt;BR /&gt;end if&lt;BR /&gt;end sub&lt;/P&gt;&lt;P&gt;seems to work... BUT&lt;/P&gt;&lt;P&gt;after 6 selections in my listbox, instead of listing the selected values, it just gives me the count - "7 of 1616"&lt;/P&gt;&lt;P&gt;what do i need to do to continue to get all the selected values?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Aug 2010 21:41:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/GetRelevantSelections-returning-selections-from-other-object/m-p/158882#M33747</guid>
      <dc:creator />
      <dc:date>2010-08-12T21:41:25Z</dc:date>
    </item>
  </channel>
</rss>

