<?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 - select from two fields using 'Or'! in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Macro-select-from-two-fields-using-Or/m-p/958832#M329232</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Howdy!&lt;/P&gt;&lt;P&gt;I have a field called Portfolio.&amp;nbsp; Associated with each Portfolio is a list of characteristics that need to be automatically filtered on when that Portfolio is selected to give me a list of Projects that meet those criteria.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So for instance - Portfolio A has the following fields: Division=Soup, Status = Hot&lt;/P&gt;&lt;P&gt;Portfolio B has the following fields: Business=Nuts, Project = SomeProjectName&lt;/P&gt;&lt;P&gt;Portfolio C has the following fields: Division=Soup, Business=Nuts&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When the user selects Portfolio A, the macro that I have created and associated with the Portfolio field event trigger in the Document Properties successfully gets all Projects with a Division of Soup AND a Status of Hot.&amp;nbsp; LIkewise for Portfolio B.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My problem comes with Portfolio C because Division and Business need to be selected using 'OR' logic - show me all projects where Division = Soup OR Business = Nuts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is what a portion of my macro looks like for setting one of the filters:&lt;/P&gt;&lt;P&gt;~~~~~~~~~~~~~~~~~~&lt;/P&gt;&lt;P&gt;' Set Tech Platform&lt;/P&gt;&lt;P&gt;&amp;nbsp; set val=ActiveDocument.Fields("Tech Platform List").GetPossibleValues&lt;/P&gt;&lt;P&gt;&amp;nbsp; set val1=ActiveDocument.Fields("Tech Platform")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set fv=val1.GetNoValues&lt;/P&gt;&lt;P&gt;&amp;nbsp; for i = 0 to val.Count-1&lt;/P&gt;&lt;P&gt;&amp;nbsp; fv.Add&lt;/P&gt;&lt;P&gt;&amp;nbsp; fv(i).Text = val.Item(i).Text&lt;/P&gt;&lt;P&gt;&amp;nbsp; fv(i).IsNumeric = false&lt;/P&gt;&lt;P&gt;&amp;nbsp; next&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; val1.SelectValues fv&lt;/P&gt;&lt;P&gt;~~~~~~~~~~~~~~~~~~&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This works like a champ!&amp;nbsp; &lt;/P&gt;&lt;P&gt;So how do I alter this to 'OR' another value in there??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help appreciated!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 19 Aug 2015 21:11:05 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-08-19T21:11:05Z</dc:date>
    <item>
      <title>Macro - select from two fields using 'Or'!</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-select-from-two-fields-using-Or/m-p/958832#M329232</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Howdy!&lt;/P&gt;&lt;P&gt;I have a field called Portfolio.&amp;nbsp; Associated with each Portfolio is a list of characteristics that need to be automatically filtered on when that Portfolio is selected to give me a list of Projects that meet those criteria.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So for instance - Portfolio A has the following fields: Division=Soup, Status = Hot&lt;/P&gt;&lt;P&gt;Portfolio B has the following fields: Business=Nuts, Project = SomeProjectName&lt;/P&gt;&lt;P&gt;Portfolio C has the following fields: Division=Soup, Business=Nuts&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When the user selects Portfolio A, the macro that I have created and associated with the Portfolio field event trigger in the Document Properties successfully gets all Projects with a Division of Soup AND a Status of Hot.&amp;nbsp; LIkewise for Portfolio B.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My problem comes with Portfolio C because Division and Business need to be selected using 'OR' logic - show me all projects where Division = Soup OR Business = Nuts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is what a portion of my macro looks like for setting one of the filters:&lt;/P&gt;&lt;P&gt;~~~~~~~~~~~~~~~~~~&lt;/P&gt;&lt;P&gt;' Set Tech Platform&lt;/P&gt;&lt;P&gt;&amp;nbsp; set val=ActiveDocument.Fields("Tech Platform List").GetPossibleValues&lt;/P&gt;&lt;P&gt;&amp;nbsp; set val1=ActiveDocument.Fields("Tech Platform")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set fv=val1.GetNoValues&lt;/P&gt;&lt;P&gt;&amp;nbsp; for i = 0 to val.Count-1&lt;/P&gt;&lt;P&gt;&amp;nbsp; fv.Add&lt;/P&gt;&lt;P&gt;&amp;nbsp; fv(i).Text = val.Item(i).Text&lt;/P&gt;&lt;P&gt;&amp;nbsp; fv(i).IsNumeric = false&lt;/P&gt;&lt;P&gt;&amp;nbsp; next&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; val1.SelectValues fv&lt;/P&gt;&lt;P&gt;~~~~~~~~~~~~~~~~~~&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This works like a champ!&amp;nbsp; &lt;/P&gt;&lt;P&gt;So how do I alter this to 'OR' another value in there??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help appreciated!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Aug 2015 21:11:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-select-from-two-fields-using-Or/m-p/958832#M329232</guid>
      <dc:creator />
      <dc:date>2015-08-19T21:11:05Z</dc:date>
    </item>
  </channel>
</rss>

