<?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: Dynamically add dimensions to Hypercube in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/Dynamically-add-dimensions-to-Hypercube/m-p/1707506#M12834</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Yes, applyPatches() is the right call to use for this. I once wrote a short guide to it, you find it here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://extendingqlik.upper88.com/guide-to-qlik-sense-applypatches/" target="_blank"&gt;https://extendingqlik.upper88.com/guide-to-qlik-sense-applypatches/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;If you are using dimensions (which is what you get from DimensionList), the key property that needs to be set is qLibraryId.&amp;nbsp; I think everything else is optional. You find the complete structure here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.qlik.com/en-US/sense-developer/April2020/APIs/EngineAPI/definitions-NxDimension.html" target="_blank"&gt;https://help.qlik.com/en-US/sense-developer/April2020/APIs/EngineAPI/definitions-NxDimension.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;qInterColumnSortOrder is an array that determines in which order columns are used for sorting. Start with not setting it, that will give you the default, which is 0,1,2....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;</description>
    <pubDate>Tue, 02 Jun 2020 14:54:13 GMT</pubDate>
    <dc:creator>ErikWetterberg</dc:creator>
    <dc:date>2020-06-02T14:54:13Z</dc:date>
    <item>
      <title>Dynamically add dimensions to Hypercube</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Dynamically-add-dimensions-to-Hypercube/m-p/1707490#M12833</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have a requirement for user to be able to add a number of dimensions to a table in one step, without editing the extension and having to add the one by one. There is also a requirement that the data be exportable.&lt;/P&gt;&lt;P&gt;I was able to get the list of fields by calling app.getList("DimensionList" ..), passing the dimensions&amp;nbsp; to createCube(), and rendering the resulting Hypercube to a table. This approach works, but the data is not available for export from the export context menu. I think I need to do one of the following:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Find a way to get the export function to point at the Hypercube that was created with createCube() so users can download an Excel workbook.&lt;/LI&gt;&lt;LI&gt;Modify the extension's Hypercube that is defined in its initialProperties at runtime to include new dimensions.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Is number one even possible?&lt;/P&gt;&lt;P&gt;Number two seems like the correct option. Is using applyPatches() with operation "add" the right way to do it? Assuming it is, I have the following questions:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;SPAN&gt;Does the entire structure of the elements in qHyperCubeDef.qDimensions&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;have to be given, or can I just set the dimension name? &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Can I just set the dimension's qId&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;to any random value, or does this value have to be looked up someplace?&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;&lt;SPAN&gt;Is qHyperCubeDef.qInterColumnSortOrder&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;always just a list from 0 to N? Does it have to be explicitly set?&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Any pointers in the right direction would be greatly appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Aug 2021 19:18:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Dynamically-add-dimensions-to-Hypercube/m-p/1707490#M12833</guid>
      <dc:creator>Paul_McGovern</dc:creator>
      <dc:date>2021-08-13T19:18:12Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically add dimensions to Hypercube</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Dynamically-add-dimensions-to-Hypercube/m-p/1707506#M12834</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Yes, applyPatches() is the right call to use for this. I once wrote a short guide to it, you find it here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://extendingqlik.upper88.com/guide-to-qlik-sense-applypatches/" target="_blank"&gt;https://extendingqlik.upper88.com/guide-to-qlik-sense-applypatches/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;If you are using dimensions (which is what you get from DimensionList), the key property that needs to be set is qLibraryId.&amp;nbsp; I think everything else is optional. You find the complete structure here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.qlik.com/en-US/sense-developer/April2020/APIs/EngineAPI/definitions-NxDimension.html" target="_blank"&gt;https://help.qlik.com/en-US/sense-developer/April2020/APIs/EngineAPI/definitions-NxDimension.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;qInterColumnSortOrder is an array that determines in which order columns are used for sorting. Start with not setting it, that will give you the default, which is 0,1,2....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jun 2020 14:54:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Dynamically-add-dimensions-to-Hypercube/m-p/1707506#M12834</guid>
      <dc:creator>ErikWetterberg</dc:creator>
      <dc:date>2020-06-02T14:54:13Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically add dimensions to Hypercube</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Dynamically-add-dimensions-to-Hypercube/m-p/1707578#M12835</link>
      <description>&lt;P&gt;Thank you for your reply, Erik.&lt;/P&gt;&lt;P&gt;Unfortunately I misspoke earlier when I said I was using getList( "DimensionList" ). This call returns an empty array. I was actually calling getList( "FieldList" ). It returns all the dimensions in the data source, but the objects do not contain the unique ID for the dimensions.&lt;/P&gt;&lt;P&gt;I tried creating&amp;nbsp; a generic object of type qDimensionListDef, but it returned an empty list. I also tried defining the qDimensionListDef in the initial properties, but it too was an empty list.&lt;/P&gt;&lt;P&gt;I should add the Hypercube is populated with data and appears to work as expected.&lt;/P&gt;&lt;P&gt;Is there some other way to get the dimension IDs?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jun 2020 18:54:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Dynamically-add-dimensions-to-Hypercube/m-p/1707578#M12835</guid>
      <dc:creator>Paul_McGovern</dc:creator>
      <dc:date>2020-06-02T18:54:45Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically add dimensions to Hypercube</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Dynamically-add-dimensions-to-Hypercube/m-p/1707724#M12836</link>
      <description>&lt;P&gt;Are there dimensions defined in the app? If getList("DimensionList") returns an empty array there might not be any.&lt;/P&gt;&lt;P&gt;To use qDimensionListDef you also need to set qType to 'dimension'. For an example, check here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://extendingqlik.upper88.com/accessing-system-data-and-variables-in-a-qlik-sense-extension/" target="_blank"&gt;https://extendingqlik.upper88.com/accessing-system-data-and-variables-in-a-qlik-sense-extension/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;If there are no dimensions defined, you need to use the FieldList instead (or define dimensions..).&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jun 2020 08:26:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Dynamically-add-dimensions-to-Hypercube/m-p/1707724#M12836</guid>
      <dc:creator>ErikWetterberg</dc:creator>
      <dc:date>2020-06-03T08:26:50Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically add dimensions to Hypercube</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Dynamically-add-dimensions-to-Hypercube/m-p/1708557#M12849</link>
      <description>&lt;P&gt;What I ended up doing was create a hypercube with the list of fields as dimension, and then stashing the context returned in the promise into a variable. Subsequent data fetches use this context instead of the on in the main app to get data.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jun 2020 13:13:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Dynamically-add-dimensions-to-Hypercube/m-p/1708557#M12849</guid>
      <dc:creator>Paul_McGovern</dc:creator>
      <dc:date>2020-06-05T13:13:32Z</dc:date>
    </item>
  </channel>
</rss>

