<?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 From OnActivateMacro to OnActivateActionItems using charts in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/From-OnActivateMacro-to-OnActivateActionItems-using-charts/m-p/262658#M709798</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm trying to migrate a version 7.52 document to version 10.&lt;BR /&gt;The document contains a VBScript line &lt;BR /&gt;prop.GraphLayout.Frame.OnActivateMacro = "MacrosName"&lt;BR /&gt;that causes a problem saying the the object doesn't support property or method: 'prop.GraphLayout.Frame.OnActivateMacro'&lt;/P&gt;&lt;P&gt;Obviously there were some changes and now ActionItems have to be used.&lt;BR /&gt;To get some understanding I copied code from the API Guide and modified it. Using a list box object everything seems to work fine. Using a chart object (pivot table) as I will eventually need to I'm told 'prop.Layout' is not supported.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;sub actionItemsOfListBox&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; set myobject = ActiveDocument.GetSheetObject("LB27")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; set prop = myobject.GetProperties&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; set actions = prop.Layout.Frame.OnActivateActionItems&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; for i=0 to actions.Count-1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; msgbox "Action types: " &amp;amp; actions.item(i).Type&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; next&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;end sub&lt;/SPAN&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I tried a second example from the API Guide which works fine for charts but no ActionItems are shown although there is a trigger defined for the chart in the sheet properties.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I guess I'm looking in the wrong place. Maybe OnActivateActionItems ist not the right method for what I want to do? But then it seems to be ok for list boxes.&lt;/P&gt;&lt;P&gt;Yes, I looked at the postings in this forum but I couldn't find the answer to my problem. At least none I understood.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you help?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Franziska&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;sub actionItemsOfChart&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; set MyGraph = ActiveDocument.GetSheetObject("8+CH491GENERIC")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; set prop = MyGraph.GetProperties&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; set GraphActions = prop.ActionItems&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; Types=""&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; for i=0 to GraphActions.Count-1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; Types = Types &amp;amp; " " &amp;amp; GraphActions.Item(i).Type&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; next&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; msgbox "Action items: " &amp;amp; Types&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;end sub&lt;/SPAN&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 20 Oct 2011 11:05:58 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-10-20T11:05:58Z</dc:date>
    <item>
      <title>From OnActivateMacro to OnActivateActionItems using charts</title>
      <link>https://community.qlik.com/t5/QlikView/From-OnActivateMacro-to-OnActivateActionItems-using-charts/m-p/262658#M709798</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm trying to migrate a version 7.52 document to version 10.&lt;BR /&gt;The document contains a VBScript line &lt;BR /&gt;prop.GraphLayout.Frame.OnActivateMacro = "MacrosName"&lt;BR /&gt;that causes a problem saying the the object doesn't support property or method: 'prop.GraphLayout.Frame.OnActivateMacro'&lt;/P&gt;&lt;P&gt;Obviously there were some changes and now ActionItems have to be used.&lt;BR /&gt;To get some understanding I copied code from the API Guide and modified it. Using a list box object everything seems to work fine. Using a chart object (pivot table) as I will eventually need to I'm told 'prop.Layout' is not supported.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;sub actionItemsOfListBox&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; set myobject = ActiveDocument.GetSheetObject("LB27")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; set prop = myobject.GetProperties&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; set actions = prop.Layout.Frame.OnActivateActionItems&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; for i=0 to actions.Count-1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; msgbox "Action types: " &amp;amp; actions.item(i).Type&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; next&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;end sub&lt;/SPAN&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I tried a second example from the API Guide which works fine for charts but no ActionItems are shown although there is a trigger defined for the chart in the sheet properties.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I guess I'm looking in the wrong place. Maybe OnActivateActionItems ist not the right method for what I want to do? But then it seems to be ok for list boxes.&lt;/P&gt;&lt;P&gt;Yes, I looked at the postings in this forum but I couldn't find the answer to my problem. At least none I understood.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you help?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Franziska&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;sub actionItemsOfChart&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; set MyGraph = ActiveDocument.GetSheetObject("8+CH491GENERIC")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; set prop = MyGraph.GetProperties&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; set GraphActions = prop.ActionItems&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; Types=""&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; for i=0 to GraphActions.Count-1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; Types = Types &amp;amp; " " &amp;amp; GraphActions.Item(i).Type&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; next&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; msgbox "Action items: " &amp;amp; Types&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;end sub&lt;/SPAN&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Oct 2011 11:05:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/From-OnActivateMacro-to-OnActivateActionItems-using-charts/m-p/262658#M709798</guid>
      <dc:creator />
      <dc:date>2011-10-20T11:05:58Z</dc:date>
    </item>
    <item>
      <title>From OnActivateMacro to OnActivateActionItems using charts</title>
      <link>https://community.qlik.com/t5/QlikView/From-OnActivateMacro-to-OnActivateActionItems-using-charts/m-p/262659#M709799</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As for the listbox you need to get the right ActionItem array, the following should work on any sheet object:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sub ActivationActionItems&lt;/P&gt;&lt;P&gt; set myobject = ActiveDocument.GetSheetObject("CH01")&lt;/P&gt;&lt;P&gt; set frame = myobject.GetFrameDef&lt;/P&gt;&lt;P&gt; set actions = frame.OnActivateActionItems&lt;/P&gt;&lt;P&gt; for i=0 to actions.Count-1&lt;/P&gt;&lt;P&gt;&amp;nbsp; msgbox "Action types: " &amp;amp; actions.item(i).Type&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;The &lt;CODE class="jive-code"&gt;ActionItems in chart properties is used when clicking in the chart (only avaliable for gauge charts)&lt;BR /&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Oct 2011 11:28:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/From-OnActivateMacro-to-OnActivateActionItems-using-charts/m-p/262659#M709799</guid>
      <dc:creator>kji</dc:creator>
      <dc:date>2011-10-20T11:28:06Z</dc:date>
    </item>
    <item>
      <title>Re: From OnActivateMacro to OnActivateActionItems using charts</title>
      <link>https://community.qlik.com/t5/QlikView/From-OnActivateMacro-to-OnActivateActionItems-using-charts/m-p/262660#M709800</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;also seems to work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;P&gt;' QlikView 7.52&lt;/P&gt;&lt;P&gt;prop.GraphLayout.Frame.OnActivateMacro = "SetActiveObject"&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;' QlikView 10...&lt;BR /&gt;&lt;BR /&gt;prop.GraphLayout.Frame.OnActivateActionItems.Add&lt;BR /&gt;i = prop.GraphLayout.Frame.OnActivateActionItems.Count - 1&lt;BR /&gt;prop.GraphLayout.Frame.OnActivateActionItems.Item(i).Type = 13&lt;BR /&gt;prop.GraphLayout.Frame.OnACtivateActionItems.Item(i).Parameters.Add&lt;BR /&gt;prop.GraphLayout.Frame.OnACtivateActionItems.Item(i).Parameters(0).v = "SetActiveObject"&lt;BR /&gt;obj.SetProperties prop &lt;/P&gt;&lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Oct 2011 15:30:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/From-OnActivateMacro-to-OnActivateActionItems-using-charts/m-p/262660#M709800</guid>
      <dc:creator />
      <dc:date>2011-10-20T15:30:05Z</dc:date>
    </item>
  </channel>
</rss>

