<?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 Value present in a list box or not using Macro in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Value-present-in-a-list-box-or-not-using-Macro/m-p/445148#M561910</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to write a macro which checks whether a particular value is present in a list box or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example if i have a list box of country, i want to check whether Australia is present in listbox or not.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 15 Mar 2013 09:41:13 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-03-15T09:41:13Z</dc:date>
    <item>
      <title>Value present in a list box or not using Macro</title>
      <link>https://community.qlik.com/t5/QlikView/Value-present-in-a-list-box-or-not-using-Macro/m-p/445148#M561910</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to write a macro which checks whether a particular value is present in a list box or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example if i have a list box of country, i want to check whether Australia is present in listbox or not.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Mar 2013 09:41:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Value-present-in-a-list-box-or-not-using-Macro/m-p/445148#M561910</guid>
      <dc:creator />
      <dc:date>2013-03-15T09:41:13Z</dc:date>
    </item>
    <item>
      <title>Re: Value present in a list box or not using Macro</title>
      <link>https://community.qlik.com/t5/QlikView/Value-present-in-a-list-box-or-not-using-Macro/m-p/445149#M561911</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;Depending on what you need to do with the result, you can do that within an expression (incl condition display/calculations) and dimensions without resorting to a macro.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Being present in the list box means that it exists in the field. Or do you mean selected in the list box?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Mar 2013 09:47:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Value-present-in-a-list-box-or-not-using-Macro/m-p/445149#M561911</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2013-03-15T09:47:58Z</dc:date>
    </item>
    <item>
      <title>Re: Value present in a list box or not using Macro</title>
      <link>https://community.qlik.com/t5/QlikView/Value-present-in-a-list-box-or-not-using-Macro/m-p/445150#M561912</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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Find below the macro for the same,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sub Check&lt;/P&gt;&lt;P&gt;vCheck = 0&lt;BR /&gt;set v = ActiveDocument.Variables("vYear")&lt;BR /&gt;vYear = v.GetContent.String&lt;/P&gt;&lt;P&gt;set table = ActiveDocument.GetSheetObject( "LB01" )&lt;BR /&gt;for RowIter = 0 to table.GetRowCount-1&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for ColIter =0 to table.GetColumnCount-1&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set cell = table.GetCell(RowIter,ColIter)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if vYear = cell.Text then&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; vCheck = 1&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end if&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; next&lt;BR /&gt;next&lt;/P&gt;&lt;P&gt;if vCheck = 1 then&lt;BR /&gt; msgbox "Value Matched"&lt;BR /&gt;Else&lt;BR /&gt; Msgbox "Value Not Matched"&lt;BR /&gt;End if&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;BR /&gt;End Sub&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here variable vYear is created to take input from user and checking the same value in field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kaushik Solanki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Mar 2013 09:55:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Value-present-in-a-list-box-or-not-using-Macro/m-p/445150#M561912</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2013-03-15T09:55:26Z</dc:date>
    </item>
    <item>
      <title>Re: Value present in a list box or not using Macro</title>
      <link>https://community.qlik.com/t5/QlikView/Value-present-in-a-list-box-or-not-using-Macro/m-p/445151#M561913</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this macro:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sub findlistvalue&lt;/P&gt;&lt;P&gt;set table = ActiveDocument.GetSheetObject( "LB08" )&lt;/P&gt;&lt;P&gt;for RowIter = 0 to table.GetRowCount-1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for ColIter =0 to table.GetColumnCount-1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set cell = table.GetCell(RowIter,ColIter)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(cell.Text="India") Then msgbox(cell.Text)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; next&lt;/P&gt;&lt;P&gt;next&lt;/P&gt;&lt;P&gt;end sub&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note:&lt;/P&gt;&lt;P&gt;Change the "LB08" according to your list value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;Sushil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Mar 2013 10:10:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Value-present-in-a-list-box-or-not-using-Macro/m-p/445151#M561913</guid>
      <dc:creator>sushil353</dc:creator>
      <dc:date>2013-03-15T10:10:15Z</dc:date>
    </item>
  </channel>
</rss>

