<?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 Get child nodes of a specific node from a tree cube with getHyperCubeTreeData in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/Get-child-nodes-of-a-specific-node-from-a-tree-cube-with/m-p/2031145#M18000</link>
    <description>&lt;P&gt;Hi Everybody,&lt;/P&gt;
&lt;P&gt;I am trying to implement a hierarchical drop down menu in the mashup using enigma js. To get the data I am using a session object of type 'tree' and '&lt;SPAN&gt;getHyperCubeTreeData&lt;/SPAN&gt;' method.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The whole tree is quite large so I decided to extract it one level at a time (qDepth = 1) based on user's clicks (without selection). E.g. I only extract the children of the node that the user clicked.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The problem I have is I can't quite get how do I specify the qArea to extract only a specific node's children. I was trying to get qArea limits from a selected parent but apparently something is wrong there, the function returns random (as it seems) parts of the cube, the whole field or an empty array.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you please help me to specify the qArea parameter to get a specific node's children?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;const hierarchyObject= {
    qInfo: {"qType": "tree-list"},
    qTreeDataDef: {
        qDimensions: [
            { qDef: {  qFieldDefs: ['=[Field1]'], qNullSuppression : true} },
            { qDef: {  qFieldDefs: ['=[Field2]'], qNullSuppression : true} },
            { qDef: {  qFieldDefs: ['=[Field3]'], qNullSuppression : true} },
            { qDef: {  qFieldDefs: ['=[Field4]'], qNullSuppression : true} },
            { qDef: {  qFieldDefs: ['=[Field5]'], qNullSuppression : true} },
            { qDef: {  qFieldDefs: ['=[Field6]'], qNullSuppression : true} },
            { qDef: {  qFieldDefs: ['=[Field7]'], qNullSuppression : true} },
        ],
        qInitialDataFetch: [{
            //qMaxNbrOfNodes: 100,
            qTreeLevels: { qDepth: 1, qLeft: 0},
            qTreeNodes: [{qArea: {qLeft: 1, qTop: 0, qWidth: 100, qHeight: 100}, }]
        }],
        qMode: 'DATA_MODE_TREE',
        qOpenFullyExpanded: true,
        qSuppressMissing: true,
        qAlwaysFullyExpanded:true
    }
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;async function drillDown(node) {
        console.log(node)
        let leftOffset  = node.qTreePath.length+1;
        let topOffset   = node.qGroupPos; 
        let batchHeight = node.qGroupSize  ;

        console.log(leftOffset, topOffset, batchHeight)
        let obj = await hierarchyObject;

        let treeData = await obj.getHyperCubeTreeData({
              qPath: `/qTreeDataDef`,
              qNodeOptions: {
                qMaxNbrOfNodes: 100000,
                qTreeLevels: { qDepth: 1, qLeft:  leftOffset},
                qTreeNodes: [ {qArea: {qLeft: 1, qTop: topOffset, qHeight: 1, qWidth: 1}}],
              },
            });

        console.log(treeData)
        
    }&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 28 Jan 2023 18:03:18 GMT</pubDate>
    <dc:creator>Andrey_Kosarev</dc:creator>
    <dc:date>2023-01-28T18:03:18Z</dc:date>
    <item>
      <title>Get child nodes of a specific node from a tree cube with getHyperCubeTreeData</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Get-child-nodes-of-a-specific-node-from-a-tree-cube-with/m-p/2031145#M18000</link>
      <description>&lt;P&gt;Hi Everybody,&lt;/P&gt;
&lt;P&gt;I am trying to implement a hierarchical drop down menu in the mashup using enigma js. To get the data I am using a session object of type 'tree' and '&lt;SPAN&gt;getHyperCubeTreeData&lt;/SPAN&gt;' method.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The whole tree is quite large so I decided to extract it one level at a time (qDepth = 1) based on user's clicks (without selection). E.g. I only extract the children of the node that the user clicked.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The problem I have is I can't quite get how do I specify the qArea to extract only a specific node's children. I was trying to get qArea limits from a selected parent but apparently something is wrong there, the function returns random (as it seems) parts of the cube, the whole field or an empty array.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you please help me to specify the qArea parameter to get a specific node's children?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;const hierarchyObject= {
    qInfo: {"qType": "tree-list"},
    qTreeDataDef: {
        qDimensions: [
            { qDef: {  qFieldDefs: ['=[Field1]'], qNullSuppression : true} },
            { qDef: {  qFieldDefs: ['=[Field2]'], qNullSuppression : true} },
            { qDef: {  qFieldDefs: ['=[Field3]'], qNullSuppression : true} },
            { qDef: {  qFieldDefs: ['=[Field4]'], qNullSuppression : true} },
            { qDef: {  qFieldDefs: ['=[Field5]'], qNullSuppression : true} },
            { qDef: {  qFieldDefs: ['=[Field6]'], qNullSuppression : true} },
            { qDef: {  qFieldDefs: ['=[Field7]'], qNullSuppression : true} },
        ],
        qInitialDataFetch: [{
            //qMaxNbrOfNodes: 100,
            qTreeLevels: { qDepth: 1, qLeft: 0},
            qTreeNodes: [{qArea: {qLeft: 1, qTop: 0, qWidth: 100, qHeight: 100}, }]
        }],
        qMode: 'DATA_MODE_TREE',
        qOpenFullyExpanded: true,
        qSuppressMissing: true,
        qAlwaysFullyExpanded:true
    }
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;async function drillDown(node) {
        console.log(node)
        let leftOffset  = node.qTreePath.length+1;
        let topOffset   = node.qGroupPos; 
        let batchHeight = node.qGroupSize  ;

        console.log(leftOffset, topOffset, batchHeight)
        let obj = await hierarchyObject;

        let treeData = await obj.getHyperCubeTreeData({
              qPath: `/qTreeDataDef`,
              qNodeOptions: {
                qMaxNbrOfNodes: 100000,
                qTreeLevels: { qDepth: 1, qLeft:  leftOffset},
                qTreeNodes: [ {qArea: {qLeft: 1, qTop: topOffset, qHeight: 1, qWidth: 1}}],
              },
            });

        console.log(treeData)
        
    }&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 28 Jan 2023 18:03:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Get-child-nodes-of-a-specific-node-from-a-tree-cube-with/m-p/2031145#M18000</guid>
      <dc:creator>Andrey_Kosarev</dc:creator>
      <dc:date>2023-01-28T18:03:18Z</dc:date>
    </item>
  </channel>
</rss>

