<?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: Alter layout of table in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/Alter-layout-of-table/m-p/994255#M3860</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using the .NetSDK you could do something like this in C#:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ITable table = app.GetObject&amp;lt;Table&amp;gt;(&amp;lt;the id of the table object&amp;gt;);&lt;/P&gt;&lt;P&gt;using (table.SuspendedLayout)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; table.Properties.HyperCubeDef.Dimensions = table.Properties.HyperCubeDef.Dimensions.Where(KeepColumn);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And then "KeepColumn" would be a function that looks something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;private static bool KeepColumn(TableHyperCubeDimensionDef dimensionDef)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return &amp;lt;logic to check that I want to keep dimension&amp;gt;;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 27 Nov 2015 11:09:11 GMT</pubDate>
    <dc:creator>Øystein_Kolsrud</dc:creator>
    <dc:date>2015-11-27T11:09:11Z</dc:date>
    <item>
      <title>Alter layout of table</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Alter-layout-of-table/m-p/994254#M3859</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to remove/add columns, programmatically, in a table. When using the API Explorer I can get a list of all kolumns and measures using GetLayout but my question is this: using an API, which method is appropriate for adding/removing columns in a table?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best&lt;/P&gt;&lt;P&gt;Anders&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Nov 2015 16:04:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Alter-layout-of-table/m-p/994254#M3859</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-11-26T16:04:43Z</dc:date>
    </item>
    <item>
      <title>Re: Alter layout of table</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Alter-layout-of-table/m-p/994255#M3860</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using the .NetSDK you could do something like this in C#:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ITable table = app.GetObject&amp;lt;Table&amp;gt;(&amp;lt;the id of the table object&amp;gt;);&lt;/P&gt;&lt;P&gt;using (table.SuspendedLayout)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; table.Properties.HyperCubeDef.Dimensions = table.Properties.HyperCubeDef.Dimensions.Where(KeepColumn);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And then "KeepColumn" would be a function that looks something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;private static bool KeepColumn(TableHyperCubeDimensionDef dimensionDef)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return &amp;lt;logic to check that I want to keep dimension&amp;gt;;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Nov 2015 11:09:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Alter-layout-of-table/m-p/994255#M3860</guid>
      <dc:creator>Øystein_Kolsrud</dc:creator>
      <dc:date>2015-11-27T11:09:11Z</dc:date>
    </item>
  </channel>
</rss>

