<?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 Re: Correction in macro in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Correction-in-macro/m-p/502283#M187645</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Generally this macro worked - where is the problem? I suggest another way to extract the selected value like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;id=x(0)&lt;/P&gt;&lt;P&gt;id = mid(id, instr(id, chr(9)))&lt;/P&gt;&lt;P&gt;'msgbox id&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Furthermore it don't need a macro for this. per field-functions like getfieldselections(), getselectedcount() directly in the attribute expression could the same achieved.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 22 Jul 2013 12:04:56 GMT</pubDate>
    <dc:creator>marcus_sommer</dc:creator>
    <dc:date>2013-07-22T12:04:56Z</dc:date>
    <item>
      <title>Correction in macro</title>
      <link>https://community.qlik.com/t5/QlikView/Correction-in-macro/m-p/502282#M187644</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;I have a multibox, there is 100 value, What I want, Whatever value is selected there, That is my dimesion and I want to chage the color of background of selected dimension in my Multibox.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please correct this macro so I can use the same&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sub GetSelected()&lt;/P&gt;&lt;P&gt;x=ActiveDocument.GetSheetObject("MB04").GetRelevantSelections&lt;/P&gt;&lt;P&gt;COLUMN_NAME=x(0)&lt;/P&gt;&lt;P&gt;Cstr(COLUMN_NAME)&lt;/P&gt;&lt;P&gt;id=Right(Cstr(COLUMN_NAME),len(Cstr(COLUMN_NAME))-12)&lt;/P&gt;&lt;P&gt;set chart = ActiveDocument.GetSheetObject("CH28")&lt;/P&gt;&lt;P&gt;set cp = chart.GetProperties&lt;/P&gt;&lt;P&gt;set expr = cp.Expressions.Item(0).Item(0).Data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set bce = expr.AttributeExpressions.BkgColorExp &lt;/P&gt;&lt;P&gt;bce.Definition.v = "if(COLUMN_NAME='STATE_CD', red(), yellow())" &lt;/P&gt;&lt;P&gt;chart.SetProperties cp&lt;/P&gt;&lt;P&gt; &lt;SPAN style="font-size: 10pt;"&gt;End Sub&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Thanks&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jul 2013 22:56:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Correction-in-macro/m-p/502282#M187644</guid>
      <dc:creator>sona_sa</dc:creator>
      <dc:date>2013-07-19T22:56:31Z</dc:date>
    </item>
    <item>
      <title>Re: Correction in macro</title>
      <link>https://community.qlik.com/t5/QlikView/Correction-in-macro/m-p/502283#M187645</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Generally this macro worked - where is the problem? I suggest another way to extract the selected value like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;id=x(0)&lt;/P&gt;&lt;P&gt;id = mid(id, instr(id, chr(9)))&lt;/P&gt;&lt;P&gt;'msgbox id&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Furthermore it don't need a macro for this. per field-functions like getfieldselections(), getselectedcount() directly in the attribute expression could the same achieved.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jul 2013 12:04:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Correction-in-macro/m-p/502283#M187645</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2013-07-22T12:04:56Z</dc:date>
    </item>
  </channel>
</rss>

