<?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: How do I set multiple values in list box from 4 variables via macro in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-do-I-set-multiple-values-in-list-box-from-4-variables-via/m-p/555536#M207467</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Again Mayil, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry I jumped the gun and have just realised there was a typo in your code (vPrevWeekEndingDat3 was missing the e!) so now I have corrected that it is working great. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks so much for your time and assistance with this one. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Ben&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 20 Nov 2013 23:50:39 GMT</pubDate>
    <dc:creator>canoebi99</dc:creator>
    <dc:date>2013-11-20T23:50:39Z</dc:date>
    <item>
      <title>How do I set multiple values in list box from 4 variables via macro</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-I-set-multiple-values-in-list-box-from-4-variables-via/m-p/555532#M207463</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have four variables that are set on load of the document called:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vPrevWeekEndingDate &lt;/P&gt;&lt;P&gt;vPrevWeekEndingDate2 &lt;/P&gt;&lt;P&gt;vPrevWeekEndingDate3 &lt;/P&gt;&lt;P&gt;vPrevWeekEndingDate4 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These basically hold the last four week ending dates. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Within a macro I then need to apply these dates to the selection list I have for WeekEnding Dates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When setting a single value I have used the below code which has worked perfectly:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ActiveDocument.Fields("WeekEnding").Select getVariable("vPrevWeekEndingDate")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However I am not sure of the syntax to set all four values into the list. I have tried the following but it doesn't work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ActiveDocument.Fields("WeekEnding").Select("( getVariable(vPrevWeekEndingDate)|getVariable(vPrevWeekEndingDate)|getVariable(vPrevWeekEndingDate)|getVariable(vPrevWeekEndingDate))")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am sure it is something to do with the quotes because I had to take the quotes out from around each variable otherwise I get an error on checking but without the quotes I don't get anything selected? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone help with the required syntax to do this please? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks&lt;/P&gt;&lt;P&gt;Ben&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Nov 2013 21:44:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-I-set-multiple-values-in-list-box-from-4-variables-via/m-p/555532#M207463</guid>
      <dc:creator>canoebi99</dc:creator>
      <dc:date>2013-11-20T21:44:14Z</dc:date>
    </item>
    <item>
      <title>Re: How do I set multiple values in list box from 4 variables via macro</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-I-set-multiple-values-in-list-box-from-4-variables-via/m-p/555533#M207464</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why you refer macro rather than trigger selection? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Nov 2013 21:56:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-I-set-multiple-values-in-list-box-from-4-variables-via/m-p/555533#M207464</guid>
      <dc:creator>MayilVahanan</dc:creator>
      <dc:date>2013-11-20T21:56:13Z</dc:date>
    </item>
    <item>
      <title>Re: How do I set multiple values in list box from 4 variables via macro</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-I-set-multiple-values-in-list-box-from-4-variables-via/m-p/555534#M207465</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sub CurrentSelection&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set f=ActiveDocument.GetField("[&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.727272033691406px;"&gt;WeekEnding&lt;/SPAN&gt;]")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set v1 = ActiveDocument.Variables("&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.727272033691406px;"&gt;vPrevWeekEndingDate&lt;/SPAN&gt;2")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set v2 =ActiveDocument.Variables("&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.727272033691406px;"&gt;vPrevWeekEndingDat&lt;/SPAN&gt;3")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set v3 =ActiveDocument.Variables("&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.727272033691406px;"&gt;vPrevWeekEndingDate&lt;/SPAN&gt;4")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set v4 =ActiveDocument.Variables("&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.727272033691406px;"&gt;vPrevWeekEndingDate&lt;/SPAN&gt;")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; v5 = "(" &amp;amp; v1.GetContent.String &amp;amp; "|" &amp;amp; v2.GetContent.String &amp;amp; "|" &amp;amp; v3.GetContent.String &amp;amp;"|" &amp;amp; v4.GetContent.String &amp;amp;")"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; msgbox v5&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; f.select v5&lt;/P&gt;&lt;P&gt;end sub&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Nov 2013 22:17:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-I-set-multiple-values-in-list-box-from-4-variables-via/m-p/555534#M207465</guid>
      <dc:creator>MayilVahanan</dc:creator>
      <dc:date>2013-11-20T22:17:14Z</dc:date>
    </item>
    <item>
      <title>Re: How do I set multiple values in list box from 4 variables via macro</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-I-set-multiple-values-in-list-box-from-4-variables-via/m-p/555535#M207466</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mayil, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the reply, I need to use a macro to set the values as it is all part of a macro that runs a report and e-mails the report out. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried your code but it still fails where it is setting v5 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Ben&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Nov 2013 23:41:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-I-set-multiple-values-in-list-box-from-4-variables-via/m-p/555535#M207466</guid>
      <dc:creator>canoebi99</dc:creator>
      <dc:date>2013-11-20T23:41:40Z</dc:date>
    </item>
    <item>
      <title>Re: How do I set multiple values in list box from 4 variables via macro</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-I-set-multiple-values-in-list-box-from-4-variables-via/m-p/555536#M207467</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Again Mayil, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry I jumped the gun and have just realised there was a typo in your code (vPrevWeekEndingDat3 was missing the e!) so now I have corrected that it is working great. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks so much for your time and assistance with this one. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Ben&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Nov 2013 23:50:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-I-set-multiple-values-in-list-box-from-4-variables-via/m-p/555536#M207467</guid>
      <dc:creator>canoebi99</dc:creator>
      <dc:date>2013-11-20T23:50:39Z</dc:date>
    </item>
  </channel>
</rss>

