<?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: Add Group (cyclic group) dimension to straight table using Macro in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Add-Group-cyclic-group-dimension-to-straight-table-using-Macro/m-p/322433#M584051</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; Hope the attached macro file will be useful to solve your problem&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ashok&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 05 Mar 2012 10:55:50 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2012-03-05T10:55:50Z</dc:date>
    <item>
      <title>Add Group (cyclic group) dimension to straight table using Macro</title>
      <link>https://community.qlik.com/t5/QlikView/Add-Group-cyclic-group-dimension-to-straight-table-using-Macro/m-p/322431#M584048</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have 5 different cyclic groups created in my document, and a straight table that I'm trying to allow the user to specify which group(s) to show/hide via some buttons on the form and a macro.&amp;nbsp; Adding one or more of the groups as dimensions to the table works fine via the UI as you'd expect, however I'm trying to write a VBScript macro that will add/remove these group dimensions based on a user clicking/reclicking buttons on the form. These buttons simply set a different variable for each group (on/off), and based on the variable values a macro should be adding/removing the dimensions from the table appropriately.&amp;nbsp; I can't seem to get the groups to add as dimensions programatically - here's what I've got for code so far (oversimplified, but should be functional):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;﻿﻿dim v&lt;/P&gt;&lt;P&gt;dim t&lt;/P&gt;&lt;P&gt;set v = ActiveDocument.GetVariable("showGroupDim1")&lt;/P&gt;&lt;P&gt;set t = ActiveDocument.GetSheetObject("userTable")&lt;/P&gt;&lt;P&gt;if v.GetContent.String = "1" then&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; t.AddGroupDimension("Group1")&lt;/P&gt;&lt;P&gt;end if&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AddDimension doens't work, and AddGroupDimension always seems to return a returnval of -1 which I assume indicates some sort of failure, however there is no exception data or error details in the log, in the err object, or anywhere else.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Anybody know how this should be written?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note that I've also tried wrapping this all in a dummy GetProperties / SetProperties on the table too..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 04 Sep 2011 20:24:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Add-Group-cyclic-group-dimension-to-straight-table-using-Macro/m-p/322431#M584048</guid>
      <dc:creator />
      <dc:date>2011-09-04T20:24:54Z</dc:date>
    </item>
    <item>
      <title>Add Group (cyclic group) dimension to straight table using Macro</title>
      <link>https://community.qlik.com/t5/QlikView/Add-Group-cyclic-group-dimension-to-straight-table-using-Macro/m-p/322432#M584049</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 have the same problem.&lt;/P&gt;&lt;P&gt;Did you solve this problem?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Mar 2012 10:20:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Add-Group-cyclic-group-dimension-to-straight-table-using-Macro/m-p/322432#M584049</guid>
      <dc:creator />
      <dc:date>2012-03-05T10:20:59Z</dc:date>
    </item>
    <item>
      <title>Re: Add Group (cyclic group) dimension to straight table using Macro</title>
      <link>https://community.qlik.com/t5/QlikView/Add-Group-cyclic-group-dimension-to-straight-table-using-Macro/m-p/322433#M584051</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; Hope the attached macro file will be useful to solve your problem&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ashok&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Mar 2012 10:55:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Add-Group-cyclic-group-dimension-to-straight-table-using-Macro/m-p/322433#M584051</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-03-05T10:55:50Z</dc:date>
    </item>
  </channel>
</rss>

