<?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 Macro Create Container Error in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Macro-Create-Container-Error/m-p/394956#M698691</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope someone can help, I am trying to create a new container object and assign some objects into it.&lt;/P&gt;&lt;P&gt;The below code I have copied directly out of the QV11 API and it just wont work. I have updated the 2 object ID's to 2 List Boxes I have on my page but when I run it the edit module window opens. The container itself is create but not the objects are not put in place.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set ContainerObj = ActiveDocument.Sheets("Main").CreateContainer&lt;/P&gt;&lt;P&gt;set ContProp=ContainerObj.GetProperties&lt;/P&gt;&lt;P&gt; ContProp.ContainedObjects.Add &lt;/P&gt;&lt;P&gt; ContProp.SingleObjectMode=1&lt;/P&gt;&lt;P&gt; ContProp.SingleObjectStyle=1&lt;/P&gt;&lt;P&gt; ContProp.ShowObjectTypeIcons=true&lt;/P&gt;&lt;P&gt; ContProp.ContainedObjects.Add &lt;/P&gt;&lt;P&gt; ContProp.ContainedObjects.Item(0).Id = "Document\LB06"&lt;/P&gt;&lt;P&gt; ContProp.ContainedObjects.Item(0).Text.v = "Test1"&lt;/P&gt;&lt;P&gt; ContProp.ContainedObjects.Add&lt;/P&gt;&lt;P&gt; ContProp.ContainedObjects.Item(1).Id = "Document\LB05"&lt;/P&gt;&lt;P&gt; ContProp.ContainedObjects.Item(1).Text.v = "Test2"&lt;/P&gt;&lt;P&gt;ContainerObj.SetProperties ContProp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 30 Nov 2012 15:41:53 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-11-30T15:41:53Z</dc:date>
    <item>
      <title>Macro Create Container Error</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-Create-Container-Error/m-p/394956#M698691</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope someone can help, I am trying to create a new container object and assign some objects into it.&lt;/P&gt;&lt;P&gt;The below code I have copied directly out of the QV11 API and it just wont work. I have updated the 2 object ID's to 2 List Boxes I have on my page but when I run it the edit module window opens. The container itself is create but not the objects are not put in place.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set ContainerObj = ActiveDocument.Sheets("Main").CreateContainer&lt;/P&gt;&lt;P&gt;set ContProp=ContainerObj.GetProperties&lt;/P&gt;&lt;P&gt; ContProp.ContainedObjects.Add &lt;/P&gt;&lt;P&gt; ContProp.SingleObjectMode=1&lt;/P&gt;&lt;P&gt; ContProp.SingleObjectStyle=1&lt;/P&gt;&lt;P&gt; ContProp.ShowObjectTypeIcons=true&lt;/P&gt;&lt;P&gt; ContProp.ContainedObjects.Add &lt;/P&gt;&lt;P&gt; ContProp.ContainedObjects.Item(0).Id = "Document\LB06"&lt;/P&gt;&lt;P&gt; ContProp.ContainedObjects.Item(0).Text.v = "Test1"&lt;/P&gt;&lt;P&gt; ContProp.ContainedObjects.Add&lt;/P&gt;&lt;P&gt; ContProp.ContainedObjects.Item(1).Id = "Document\LB05"&lt;/P&gt;&lt;P&gt; ContProp.ContainedObjects.Item(1).Text.v = "Test2"&lt;/P&gt;&lt;P&gt;ContainerObj.SetProperties ContProp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Nov 2012 15:41:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-Create-Container-Error/m-p/394956#M698691</guid>
      <dc:creator />
      <dc:date>2012-11-30T15:41:53Z</dc:date>
    </item>
    <item>
      <title>Re: Macro Create Container Error</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-Create-Container-Error/m-p/394957#M698692</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;Try like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sub Test&lt;/P&gt;&lt;P&gt;Set ContainerObj = ActiveDocument.Sheets("Main").CreateContainer&lt;/P&gt;&lt;P&gt;set ContProp=ContainerObj.GetProperties&lt;/P&gt;&lt;P&gt;ContProp.ContainedObjects.Add&lt;/P&gt;&lt;P&gt;ContProp.SingleObjectMode=1&lt;/P&gt;&lt;P&gt;ContProp.SingleObjectStyle=1&lt;/P&gt;&lt;P&gt;ContProp.ShowObjectTypeIcons=true&lt;/P&gt;&lt;P&gt;ContProp.ContainedObjects.Add&lt;/P&gt;&lt;P&gt;ContProp.ContainedObjects&lt;STRONG&gt;.Item(0).Def.ObjectId&lt;/STRONG&gt;= "Document\LB11"&lt;/P&gt;&lt;P&gt;ContProp.ContainedObjects.Item(0).Text.v = "Test1"&lt;/P&gt;&lt;P&gt;ContProp.ContainedObjects.Add&lt;/P&gt;&lt;P&gt;ContProp.ContainedObjects&lt;STRONG&gt;.Item(1).Def.ObjectId &lt;/STRONG&gt;= "Document\LB10"&lt;/P&gt;&lt;P&gt;ContProp.ContainedObjects.Item(1).Text.v = "Test2"&lt;/P&gt;&lt;P&gt;ContainerObj.SetProperties ContProp&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;End sub&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope it helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Nov 2012 16:56:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-Create-Container-Error/m-p/394957#M698692</guid>
      <dc:creator>MayilVahanan</dc:creator>
      <dc:date>2012-11-30T16:56:03Z</dc:date>
    </item>
    <item>
      <title>Re: Macro Create Container Error</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-Create-Container-Error/m-p/394958#M698693</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much that now works perfectly!&lt;/P&gt;&lt;P&gt;Is there a new API or anything that shows these functions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have one more question...the above example is for a single object. Is there a way of creating mutiple objects? so to use the grid view of a container?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again for your help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Dec 2012 08:00:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-Create-Container-Error/m-p/394958#M698693</guid>
      <dc:creator />
      <dc:date>2012-12-03T08:00:36Z</dc:date>
    </item>
  </channel>
</rss>

