<?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 Macro to make a select on list of values from an input Field in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Macro-to-make-a-select-on-list-of-values-from-an-input-Field/m-p/213171#M66967</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="jive_text_macro jive_macro_quote" jivemacro="quote"&gt;&lt;BR /&gt;Hamlet wrote:Hi, I have the same situation, this answer is usefull for me but Im trying to select 5000 values from my list and is so slow, &lt;EM&gt;&lt;STRONG&gt;somebody knows how do it faster ??&lt;/STRONG&gt;&lt;/EM&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Are you on version 9 or above? If so, you can do this using an action instead of a macro, and I'm guessing it would be significantly faster, though I've done no performance testing to back that guess up.&lt;/P&gt;&lt;P&gt;In the attached example, the list is "delimited" by a carriage return, so it's assuming that the user has a vertical list of values that they're cutting and pasting into the input box. But the example could be changed slightly to delimit by commas or whatever you want. There's a replace() in the search string for the action where it's converting the carriage return. If you were using a comma-delimited list, for instance, just replace the carriage return with a comma, I believe.&lt;/P&gt;&lt;P&gt;Oh, in case it's confusing, the trigger for the action is a variable event trigger, so settings, document properties, triggers, variable event triggers, List, OnInput, Edit Actions(s).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 21 Dec 2010 00:26:04 GMT</pubDate>
    <dc:creator>johnw</dc:creator>
    <dc:date>2010-12-21T00:26:04Z</dc:date>
    <item>
      <title>Macro to make a select on list of values from an input Field</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-to-make-a-select-on-list-of-values-from-an-input-Field/m-p/213167#M66963</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I am trying to come up with a macro to make a selection from a delimited list of input fields in a variable.&lt;/P&gt;&lt;P&gt;The goal is for a user to paste a list of items into an input field/variable and to execute a selection from that list. I am haflfway there in that I can create the delimited list from the input field.&lt;/P&gt;&lt;P&gt;Does anyone have macro to the would parse a delimited variable and execute something like a select/toogleselect on those values.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;gdfarrell&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jul 2010 18:54:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-to-make-a-select-on-list-of-values-from-an-input-Field/m-p/213167#M66963</guid>
      <dc:creator>gfarrell</dc:creator>
      <dc:date>2010-07-02T18:54:12Z</dc:date>
    </item>
    <item>
      <title>Macro to make a select on list of values from an input Field</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-to-make-a-select-on-list-of-values-from-an-input-Field/m-p/213168#M66964</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please try out to parse the delimited variable using the substring function and store them into an array (say array named &amp;lt;varArray&amp;gt;).&lt;/P&gt;&lt;P&gt;then use ActiveDocument.Fields("fieldName").SelectValues varArray&lt;/P&gt;&lt;P&gt;This should work.&lt;/P&gt;&lt;P&gt;Please let me know if it works.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jul 2010 19:26:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-to-make-a-select-on-list-of-values-from-an-input-Field/m-p/213168#M66964</guid>
      <dc:creator>boorgura</dc:creator>
      <dc:date>2010-07-02T19:26:37Z</dc:date>
    </item>
    <item>
      <title>Macro to make a select on list of values from an input Field</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-to-make-a-select-on-list-of-values-from-an-input-Field/m-p/213169#M66965</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rocky,&lt;/P&gt;&lt;P&gt;Your point of storing the values in an array got me going in the right direction. The selectvalues didn't seem to work. This is what I ended up with :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 0pt;mso-layout-grid-align:none;"&gt;sub SelectItems&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 0pt;mso-layout-grid-align:none;"&gt;&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 0pt;mso-layout-grid-align:none;"&gt;vList = Activedocument.fields("vItemList").getcontent.string&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 0pt;mso-layout-grid-align:none;"&gt;&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 0pt;mso-layout-grid-align:none;"&gt;vArray = Split(vList, ",")&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 0pt;mso-layout-grid-align:none;"&gt;&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 0pt;mso-layout-grid-align:none;"&gt;ActiveDocument.fields("Field1").Select vArray(0)&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 0pt;mso-layout-grid-align:none;"&gt;&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 0pt;mso-layout-grid-align:none;"&gt;For i = 1 to UBound(vArray)&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 0pt;mso-layout-grid-align:none;"&gt;ActiveDocument.fields("Field1").ToggleSelect vArray(i)&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 0pt;mso-layout-grid-align:none;"&gt;Next&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 0pt;mso-layout-grid-align:none;"&gt;&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 0pt;mso-layout-grid-align:none;"&gt;End Sub&lt;/P&gt;&lt;P style="margin:0in 0in 10pt;"&gt;&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 0pt;mso-layout-grid-align:none;"&gt;&lt;/P&gt;&lt;P style="line-height:normal;margin:0in 0in 0pt;mso-layout-grid-align:none;"&gt;&lt;/P&gt;&lt;P&gt;Greg&lt;/P&gt;&lt;P&gt;&lt;/P&gt;Much appreciated &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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jul 2010 21:24:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-to-make-a-select-on-list-of-values-from-an-input-Field/m-p/213169#M66965</guid>
      <dc:creator>gfarrell</dc:creator>
      <dc:date>2010-07-02T21:24:03Z</dc:date>
    </item>
    <item>
      <title>Macro to make a select on list of values from an input Field</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-to-make-a-select-on-list-of-values-from-an-input-Field/m-p/213170#M66966</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I have the same situation, this answer is usefull for me but Im trying to select 5000 values from my list and is so slow, &lt;EM&gt;&lt;STRONG&gt;somebody knows how do it faster ??&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Dec 2010 19:23:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-to-make-a-select-on-list-of-values-from-an-input-Field/m-p/213170#M66966</guid>
      <dc:creator />
      <dc:date>2010-12-20T19:23:06Z</dc:date>
    </item>
    <item>
      <title>Macro to make a select on list of values from an input Field</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-to-make-a-select-on-list-of-values-from-an-input-Field/m-p/213171#M66967</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="jive_text_macro jive_macro_quote" jivemacro="quote"&gt;&lt;BR /&gt;Hamlet wrote:Hi, I have the same situation, this answer is usefull for me but Im trying to select 5000 values from my list and is so slow, &lt;EM&gt;&lt;STRONG&gt;somebody knows how do it faster ??&lt;/STRONG&gt;&lt;/EM&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Are you on version 9 or above? If so, you can do this using an action instead of a macro, and I'm guessing it would be significantly faster, though I've done no performance testing to back that guess up.&lt;/P&gt;&lt;P&gt;In the attached example, the list is "delimited" by a carriage return, so it's assuming that the user has a vertical list of values that they're cutting and pasting into the input box. But the example could be changed slightly to delimit by commas or whatever you want. There's a replace() in the search string for the action where it's converting the carriage return. If you were using a comma-delimited list, for instance, just replace the carriage return with a comma, I believe.&lt;/P&gt;&lt;P&gt;Oh, in case it's confusing, the trigger for the action is a variable event trigger, so settings, document properties, triggers, variable event triggers, List, OnInput, Edit Actions(s).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Dec 2010 00:26:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-to-make-a-select-on-list-of-values-from-an-input-Field/m-p/213171#M66967</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2010-12-21T00:26:04Z</dc:date>
    </item>
    <item>
      <title>Macro to make a select on list of values from an input Field</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-to-make-a-select-on-list-of-values-from-an-input-Field/m-p/213172#M66968</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jhon,&lt;/P&gt;&lt;P&gt;Thanks for your help. I'm using Qlikview 8.5 reason why i don't have trigger option, however i used your script to make a macro like this.&lt;/P&gt;&lt;P&gt;Sub Filter&lt;/P&gt;&lt;P&gt;set v = ActiveDocument.Variables("FiltroExt2")&lt;BR /&gt;strVariable = v.GetContent.String&lt;/P&gt;&lt;P&gt;vOptions = "'" &amp;amp; replace(strVariable, chr(10), "','") &amp;amp; "'"&lt;BR /&gt; Set C=ActiveDocument.Getfield("MyField")&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;C.Select "=match(MyField," &amp;amp; vOptions &amp;amp; ")"&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;End Sub&lt;/P&gt;&lt;P&gt;The performance really getting better&lt;/P&gt;&lt;P&gt;Thanks a lot.&lt;/P&gt;&lt;P&gt;Rgds&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Dec 2010 21:58:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-to-make-a-select-on-list-of-values-from-an-input-Field/m-p/213172#M66968</guid>
      <dc:creator />
      <dc:date>2010-12-22T21:58:21Z</dc:date>
    </item>
    <item>
      <title>Macro to make a select on list of values from an input Field</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-to-make-a-select-on-list-of-values-from-an-input-Field/m-p/213173#M66969</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Works nicely... Very nice logic John... You Rock &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 May 2011 11:57:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-to-make-a-select-on-list-of-values-from-an-input-Field/m-p/213173#M66969</guid>
      <dc:creator>montubhardwaj</dc:creator>
      <dc:date>2011-05-06T11:57:50Z</dc:date>
    </item>
  </channel>
</rss>

