<?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 How to know when a fild is greyed out using macro in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-know-when-a-fild-is-greyed-out-using-macro/m-p/913129#M986811</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG&gt;I am trying to program a macro in QlikView that let me know when a value in a listbox is greyed out or when its available. For example on the ProDuctAlias listbox I want to know that “Niche” and “Other” are greyed out and that “Argus” is available.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Untitled.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/93828_Untitled.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG&gt;Can anyone help me?&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG&gt;Thank you.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 23 Jul 2015 21:01:49 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-07-23T21:01:49Z</dc:date>
    <item>
      <title>How to know when a fild is greyed out using macro</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-know-when-a-fild-is-greyed-out-using-macro/m-p/913129#M986811</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG&gt;I am trying to program a macro in QlikView that let me know when a value in a listbox is greyed out or when its available. For example on the ProDuctAlias listbox I want to know that “Niche” and “Other” are greyed out and that “Argus” is available.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Untitled.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/93828_Untitled.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG&gt;Can anyone help me?&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG&gt;Thank you.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2015 21:01:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-know-when-a-fild-is-greyed-out-using-macro/m-p/913129#M986811</guid>
      <dc:creator />
      <dc:date>2015-07-23T21:01:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to know when a fild is greyed out using macro</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-know-when-a-fild-is-greyed-out-using-macro/m-p/913130#M986812</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No macro required.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use GetFieldSelections(ProductAlias,',',1000) to produce a string of the concatenated possible values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then you can use index to see if a particular value is in the string. Something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;index(&lt;SPAN style="font-size: 13.3333330154419px;"&gt;GetFieldSelections(ProductAlias,',',1000),'Argus')&amp;gt;0&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jul 2015 12:14:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-know-when-a-fild-is-greyed-out-using-macro/m-p/913130#M986812</guid>
      <dc:creator>m_woolf</dc:creator>
      <dc:date>2015-07-24T12:14:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to know when a fild is greyed out using macro</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-know-when-a-fild-is-greyed-out-using-macro/m-p/913131#M986813</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi M Woolf,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your answer, I wish I could avoid using macros, however I need to use macros because it needs to do the checking while performing an automated overnight reload .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you know how to do it using macros please let me know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jul 2015 16:37:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-know-when-a-fild-is-greyed-out-using-macro/m-p/913131#M986813</guid>
      <dc:creator />
      <dc:date>2015-07-24T16:37:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to know when a fild is greyed out using macro</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-know-when-a-fild-is-greyed-out-using-macro/m-p/913132#M986814</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your macro can use GetPossibleValues. Here is an example from the API:&lt;/P&gt;&lt;P&gt;set val=ActiveDocument.Fields("Month").GetPossibleValues&lt;/P&gt;&lt;P&gt;for i=0 to val.Count-1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; msgbox(val.Item(i).Text)&lt;/P&gt;&lt;P&gt;next&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jul 2015 16:43:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-know-when-a-fild-is-greyed-out-using-macro/m-p/913132#M986814</guid>
      <dc:creator>m_woolf</dc:creator>
      <dc:date>2015-07-24T16:43:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to know when a fild is greyed out using macro</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-know-when-a-fild-is-greyed-out-using-macro/m-p/913133#M986815</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The suggestions from &lt;A href="https://community.qlik.com/qlik-users/6142"&gt;mwoolf&lt;/A&gt; will work. Sometimes could it be easier to calculate the needed data within variables and read them those variables within the macro:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set v = ActiveDocument.Variables("Variable1")&lt;/P&gt;&lt;P&gt;msgbox(v.GetContent.String)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jul 2015 17:36:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-know-when-a-fild-is-greyed-out-using-macro/m-p/913133#M986815</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2015-07-24T17:36:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to know when a fild is greyed out using macro</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-know-when-a-fild-is-greyed-out-using-macro/m-p/913134#M986816</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Keep in mind that you can use any valid qv expression in a macro by wrapping it in the Evaluate() function. eg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ActiveDocument.Evaluate("&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;index(&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333330154419px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;GetFieldSelections(ProductAlias,',',1000),'Argus')&amp;gt;0")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, you cannot get access to the ActiveDocument during script execution. Is this something you need to determine during the script run?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jul 2015 18:34:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-know-when-a-fild-is-greyed-out-using-macro/m-p/913134#M986816</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2015-07-24T18:34:05Z</dc:date>
    </item>
  </channel>
</rss>

