<?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 Email and looping thru Macro in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Email-and-looping-thru-Macro/m-p/145280#M24013</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;All, I have spent hours seeking and have found many different solutions. But not one excatly answers the question, loop on a field, i.e sales rep, and than email each answer a jpeg of the chart filtered... All while keeping the dates selected&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help?!?!?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 28 May 2009 05:03:19 GMT</pubDate>
    <dc:creator>james</dc:creator>
    <dc:date>2009-05-28T05:03:19Z</dc:date>
    <item>
      <title>Email and looping thru Macro</title>
      <link>https://community.qlik.com/t5/QlikView/Email-and-looping-thru-Macro/m-p/145280#M24013</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;All, I have spent hours seeking and have found many different solutions. But not one excatly answers the question, loop on a field, i.e sales rep, and than email each answer a jpeg of the chart filtered... All while keeping the dates selected&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help?!?!?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 May 2009 05:03:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Email-and-looping-thru-Macro/m-p/145280#M24013</guid>
      <dc:creator>james</dc:creator>
      <dc:date>2009-05-28T05:03:19Z</dc:date>
    </item>
    <item>
      <title>Email and looping thru Macro</title>
      <link>https://community.qlik.com/t5/QlikView/Email-and-looping-thru-Macro/m-p/145281#M24014</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What exactly is not working for you, is it the looping and selecting or attaching an chart export image to an email, or something else?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 May 2009 05:20:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Email-and-looping-thru-Macro/m-p/145281#M24014</guid>
      <dc:creator />
      <dc:date>2009-05-28T05:20:17Z</dc:date>
    </item>
    <item>
      <title>Email and looping thru Macro</title>
      <link>https://community.qlik.com/t5/QlikView/Email-and-looping-thru-Macro/m-p/145282#M24015</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The looping and selecting.....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 May 2009 05:30:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Email-and-looping-thru-Macro/m-p/145282#M24015</guid>
      <dc:creator>james</dc:creator>
      <dc:date>2009-05-28T05:30:15Z</dc:date>
    </item>
    <item>
      <title>Email and looping thru Macro</title>
      <link>https://community.qlik.com/t5/QlikView/Email-and-looping-thru-Macro/m-p/145283#M24016</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You may have to keep in memory selected values prior to select them one by one,&lt;/P&gt;&lt;P&gt;else loop to all possible values.&lt;/P&gt;&lt;P&gt;This will help you :&lt;/P&gt;&lt;P&gt;set ad = ActiveDocument&lt;BR /&gt; set fd = ad.Fields('MyField')&lt;/P&gt;&lt;P&gt;' use GetSelectedValues to loop only in currently selected values&lt;BR /&gt; set pv = fd.GetPossibleValues(5000)&lt;BR /&gt;&lt;BR /&gt; if pv.Count &amp;gt; 0 then&lt;BR /&gt;&lt;BR /&gt; for i = 0 to pv.Count-1&lt;BR /&gt;&lt;BR /&gt; ' Select value&lt;BR /&gt; set fv = fd.GetNoValues&lt;BR /&gt; fv.Add&lt;BR /&gt; fv(0).IsNumeric = pv.Item(i).IsNumeric&lt;BR /&gt; if fv(0).IsNumeric then&lt;BR /&gt; fv(0).Number = pv.Item(i).Number&lt;BR /&gt; else&lt;BR /&gt; fv(0).Text = pv.Item(i).Text&lt;BR /&gt; end if&lt;BR /&gt; fd.SelectValues fv&lt;BR /&gt; set fv = nothing&lt;BR /&gt;&lt;BR /&gt; ' Selected ?&lt;BR /&gt; if (fd.GetSelectedValues(5000).Count = 1) then&lt;BR /&gt;&lt;BR /&gt; ' Do some stuff here&lt;BR /&gt; ' call email(fd)&lt;BR /&gt;&lt;BR /&gt; end if&lt;/P&gt;&lt;P&gt;' Deselect&lt;BR /&gt; set fv = fd.GetSelectedValues(5000)&lt;BR /&gt; fv.RemoveAt 0&lt;BR /&gt; fd.SelectValues fv&lt;BR /&gt; set fv = nothing&lt;BR /&gt;&lt;BR /&gt; next&lt;BR /&gt;&lt;BR /&gt; end if&lt;BR /&gt;&lt;BR /&gt; set pv = nothing&lt;BR /&gt; set fd = nothing&lt;BR /&gt; set ad = nothing&lt;BR /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 May 2009 06:52:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Email-and-looping-thru-Macro/m-p/145283#M24016</guid>
      <dc:creator>yblake</dc:creator>
      <dc:date>2009-05-28T06:52:34Z</dc:date>
    </item>
    <item>
      <title>Email and looping thru Macro</title>
      <link>https://community.qlik.com/t5/QlikView/Email-and-looping-thru-Macro/m-p/145284#M24017</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is a simple example of looping and selecting&lt;BR /&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;sub Looping&lt;BR /&gt; set R = ActiveDocument.Fields("Rep")&lt;BR /&gt; set C=R.GetPossibleValues&lt;BR /&gt; for i=0 to C.Count-1&lt;BR /&gt; call Selecting(C.item(i).text)&lt;BR /&gt; next&lt;BR /&gt;end sub&lt;BR /&gt;function Selecting(F)&lt;BR /&gt; set R = ActiveDocument.Fields("Rep")&lt;BR /&gt; R.Select F&lt;BR /&gt; msgbox(R.GetSelectedValues.item(0).text)&lt;BR /&gt; ' or whatever you want here&lt;BR /&gt; '....&lt;BR /&gt; R.Clear&lt;BR /&gt;end function&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 May 2009 07:03:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Email-and-looping-thru-Macro/m-p/145284#M24017</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-05-28T07:03:55Z</dc:date>
    </item>
    <item>
      <title>Email and looping thru Macro</title>
      <link>https://community.qlik.com/t5/QlikView/Email-and-looping-thru-Macro/m-p/145285#M24018</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is the text box necessary? i was trying to get it to automatically cycle thru the said "field" without having to click ok....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 May 2009 21:50:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Email-and-looping-thru-Macro/m-p/145285#M24018</guid>
      <dc:creator>james</dc:creator>
      <dc:date>2009-05-28T21:50:39Z</dc:date>
    </item>
    <item>
      <title>Email and looping thru Macro</title>
      <link>https://community.qlik.com/t5/QlikView/Email-and-looping-thru-Macro/m-p/145286#M24019</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You mean the message box? It's not necessary. I put it here only to be able to see what happens on each cycle. You can put whatever you need there.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 May 2009 22:33:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Email-and-looping-thru-Macro/m-p/145286#M24019</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-05-28T22:33:35Z</dc:date>
    </item>
  </channel>
</rss>

