<?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 Check Field Selection in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Macro-to-Check-Field-Selection/m-p/239925#M90490</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have a field with a single value. I am trying to write a small macro to check and see if the value in that field is selected.&lt;/P&gt;&lt;P&gt;If the value is selected then I don't want anything to happen. If the value is not selected, then I have another macro (which already works) that I want to run.&lt;/P&gt;&lt;P&gt;Can anyone help?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Scott&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 04 Mar 2011 15:40:26 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-03-04T15:40:26Z</dc:date>
    <item>
      <title>Macro to Check Field Selection</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-to-Check-Field-Selection/m-p/239925#M90490</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have a field with a single value. I am trying to write a small macro to check and see if the value in that field is selected.&lt;/P&gt;&lt;P&gt;If the value is selected then I don't want anything to happen. If the value is not selected, then I have another macro (which already works) that I want to run.&lt;/P&gt;&lt;P&gt;Can anyone help?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Scott&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Mar 2011 15:40:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-to-Check-Field-Selection/m-p/239925#M90490</guid>
      <dc:creator />
      <dc:date>2011-03-04T15:40:26Z</dc:date>
    </item>
    <item>
      <title>Macro to Check Field Selection</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-to-Check-Field-Selection/m-p/239926#M90491</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Scott,&lt;BR /&gt;This will work:&lt;BR /&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;sub MacroName&lt;BR /&gt; set f=ActiveDocument.Fields("FieldName")&lt;BR /&gt; set s=f.GetSelectedValues&lt;BR /&gt; if s.count = 1&lt;BR /&gt; ' do nothing&lt;BR /&gt; else&lt;BR /&gt; AnotherMacroName&lt;BR /&gt; end if&lt;BR /&gt;end sub&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Mar 2011 18:48:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-to-Check-Field-Selection/m-p/239926#M90491</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-03-04T18:48:44Z</dc:date>
    </item>
    <item>
      <title>Macro to Check Field Selection</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-to-Check-Field-Selection/m-p/239927#M90492</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Michael,&lt;/P&gt;&lt;P&gt;I inserted the script and added the field name and macro names. I got a message, "Macro Parse Failed. Functionality was Lost."&lt;/P&gt;&lt;P&gt;Suggestions?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Scott&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Mar 2011 20:09:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-to-Check-Field-Selection/m-p/239927#M90492</guid>
      <dc:creator />
      <dc:date>2011-03-04T20:09:57Z</dc:date>
    </item>
    <item>
      <title>Macro to Check Field Selection</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-to-Check-Field-Selection/m-p/239928#M90493</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Scott,&lt;/P&gt;&lt;P&gt;The code is just missing the "then"&lt;/P&gt;&lt;P&gt;if s.count = 1 &lt;STRONG&gt;then&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;If you use the &lt;EM&gt;Check&lt;/EM&gt; button on the macro editor it will point out the line in error instad of the generic "Macro Parse Failed..." message.&lt;/P&gt;&lt;P&gt;Here's another suggestion for testing the field, which I think is slightly simpler.&lt;/P&gt;&lt;P&gt;sub MacroName2&lt;BR /&gt; if ActiveDocument.Evaluate("GetSelectedCount(FieldName)") = 1 then&lt;BR /&gt; msgbox "is Selected"&lt;BR /&gt; else&lt;BR /&gt; msgbox "not Selected"&lt;BR /&gt; end if&lt;BR /&gt;end sub&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Mar 2011 20:27:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-to-Check-Field-Selection/m-p/239928#M90493</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2011-03-04T20:27:15Z</dc:date>
    </item>
    <item>
      <title>Macro to Check Field Selection</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-to-Check-Field-Selection/m-p/239929#M90494</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;See if I misspelled anything. The macro is rather simple, should work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Mar 2011 20:31:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-to-Check-Field-Selection/m-p/239929#M90494</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-03-04T20:31:45Z</dc:date>
    </item>
    <item>
      <title>Macro to Check Field Selection</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-to-Check-Field-Selection/m-p/239930#M90495</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sure, I missed "then" - thanks Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Mar 2011 20:32:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-to-Check-Field-Selection/m-p/239930#M90495</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-03-04T20:32:19Z</dc:date>
    </item>
  </channel>
</rss>

