<?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 Hypercube do not refresh after filter selection change in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/Hypercube-do-not-refresh-after-filter-selection-change/m-p/1801920#M14806</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I'm developing a mashup working with hypercubes. I have created a cube as described below in the code section. The code extract a name as text from the cube matrix and place it into a &amp;lt;div&amp;gt;.&lt;/P&gt;&lt;P&gt;The code works fine but I can get the data updated if a change a selection from a filter object. I need to refresh the page each time I change the selection.&lt;/P&gt;&lt;P&gt;This not happen if I use visualization on the fly such as a KPI element or charts.&lt;/P&gt;&lt;P&gt;Can someone help me to understand what I miss in the code? I think I need to create a function listening for selection changes but I don't know how to do that.&lt;/P&gt;&lt;P&gt;thank you!&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;app.createCube({
	"qInitialDataFetch": [
		{
			"qHeight": 1,
			"qWidth": 1
		}
	],
	"qDimensions": [
		{
			"qDef": {
				"qFieldDefs": [
					"[Workshop name]"
				]
			},
			"qNullSuppression": true,
			}
	],
	"qSuppressZero": false,
	"qSuppressMissing": true,
	"qMode": "S",
	"qStateName": "$"
	
	}).then(function(reply){
		let name = reply.layout.qHyperCube.qDataPages[0].qMatrix[0][0].qText;
		document.getElementById("TSname").innerHTML = name;
	})&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 22 Apr 2021 18:45:51 GMT</pubDate>
    <dc:creator>kikko</dc:creator>
    <dc:date>2021-04-22T18:45:51Z</dc:date>
    <item>
      <title>Hypercube do not refresh after filter selection change</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Hypercube-do-not-refresh-after-filter-selection-change/m-p/1801920#M14806</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I'm developing a mashup working with hypercubes. I have created a cube as described below in the code section. The code extract a name as text from the cube matrix and place it into a &amp;lt;div&amp;gt;.&lt;/P&gt;&lt;P&gt;The code works fine but I can get the data updated if a change a selection from a filter object. I need to refresh the page each time I change the selection.&lt;/P&gt;&lt;P&gt;This not happen if I use visualization on the fly such as a KPI element or charts.&lt;/P&gt;&lt;P&gt;Can someone help me to understand what I miss in the code? I think I need to create a function listening for selection changes but I don't know how to do that.&lt;/P&gt;&lt;P&gt;thank you!&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;app.createCube({
	"qInitialDataFetch": [
		{
			"qHeight": 1,
			"qWidth": 1
		}
	],
	"qDimensions": [
		{
			"qDef": {
				"qFieldDefs": [
					"[Workshop name]"
				]
			},
			"qNullSuppression": true,
			}
	],
	"qSuppressZero": false,
	"qSuppressMissing": true,
	"qMode": "S",
	"qStateName": "$"
	
	}).then(function(reply){
		let name = reply.layout.qHyperCube.qDataPages[0].qMatrix[0][0].qText;
		document.getElementById("TSname").innerHTML = name;
	})&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Apr 2021 18:45:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Hypercube-do-not-refresh-after-filter-selection-change/m-p/1801920#M14806</guid>
      <dc:creator>kikko</dc:creator>
      <dc:date>2021-04-22T18:45:51Z</dc:date>
    </item>
    <item>
      <title>Re: Hypercube do not refresh after filter selection change</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Hypercube-do-not-refresh-after-filter-selection-change/m-p/1801993#M14810</link>
      <description>&lt;P&gt;Is this the endpoint you are using?&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.qlik.com/en-US/sense-developer/February2021/Subsystems/APIs/Content/Sense_ClientAPIs/CapabilityAPIs/AppAPI/createCube-method.htm" target="_blank"&gt;https://help.qlik.com/en-US/sense-developer/February2021/Subsystems/APIs/Content/Sense_ClientAPIs/CapabilityAPIs/AppAPI/createCube-method.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;If so, then I believe you should pass that callback function as an argument and not apply in sequence on the returned promise. If I understand the documentation correctly, then that will ensure the function is called every time there is a change notification on the object containing the hypercube.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Apr 2021 06:18:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Hypercube-do-not-refresh-after-filter-selection-change/m-p/1801993#M14810</guid>
      <dc:creator>Øystein_Kolsrud</dc:creator>
      <dc:date>2021-04-23T06:18:48Z</dc:date>
    </item>
    <item>
      <title>Re: Hypercube do not refresh after filter selection change</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Hypercube-do-not-refresh-after-filter-selection-change/m-p/1802276#M14812</link>
      <description>&lt;P&gt;Hi Yko,&lt;/P&gt;&lt;P&gt;If I understood your suggestion I changed the code like that:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;app.createCube({
	"qInitialDataFetch": [
		{
			"qHeight": 1,
			"qWidth": 1
		}
	],
	"qDimensions": [
		{
			"qDef": {
				"qFieldDefs": [
					"[Workshop name]"
				]
			},
			"qNullSuppression": true,
			}
	],
	"qSuppressZero": false,
	"qSuppressMissing": true,
	"qMode": "S",
	"qStateName": "$"
	
	},testname);&lt;/LI-CODE&gt;&lt;P&gt;Then I wrote a function to use the callback:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;function testname(reply, app){
		let name = reply.layout.qHyperCube.qDataPages[0].qMatrix[0][0].qText;
		document.getElementById('TSname').innerHTML = name;
	}&lt;/LI-CODE&gt;&lt;P&gt;Effectively this is the same explained in an example in 2020 manual:&lt;/P&gt;&lt;P&gt;&lt;A title="Creating a hypercube" href="https://help.qlik.com/en-US/sense-developer/June2020/Subsystems/Dev-Hub/Content/Sense_Dev-Hub/Howtos/dev-hub-create-hypercube.htm" target="_self"&gt;https://help.qlik.com/en-US/sense-developer/June2020/Subsystems/Dev-Hub/Content/Sense_Dev-Hub/Howtos/dev-hub-create-hypercube.htm&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But in this way the "name" is not show in the &amp;lt;div&amp;gt; . I think I didn't understand what you suggested to me!&lt;/P&gt;&lt;P&gt;Please can you help to get the solution? Using the hypercube is a fantastic way to completely personalize your mashup as you want instead of fighting with already prepared object and their standard CSS.&lt;/P&gt;&lt;P&gt;Thank You&lt;/P&gt;</description>
      <pubDate>Fri, 23 Apr 2021 16:43:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Hypercube-do-not-refresh-after-filter-selection-change/m-p/1802276#M14812</guid>
      <dc:creator>kikko</dc:creator>
      <dc:date>2021-04-23T16:43:51Z</dc:date>
    </item>
    <item>
      <title>Re: Hypercube do not refresh after filter selection change</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Hypercube-do-not-refresh-after-filter-selection-change/m-p/1802294#M14813</link>
      <description>&lt;P&gt;Hi Yko,&lt;/P&gt;&lt;P&gt;sorry I didn't get the point!! My fault!! I'm not too much skilled in JS!&lt;/P&gt;&lt;P&gt;I have found the solution from the link you suggested me.&lt;/P&gt;&lt;P&gt;The code below is working fine now and I can see names change with selections.&lt;/P&gt;&lt;P&gt;Thank you so much!! You save my day :))&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;app.createCube({
	"qInitialDataFetch": [
		{
			"qHeight": 1,
			"qWidth": 1
		}
	],
	"qDimensions": [
		{
			"qDef": {
				"qFieldDefs": [
					"[Workshop name]"
				]
			},
			"qNullSuppression": true,
			}
	],
	"qSuppressZero": false,
	"qSuppressMissing": true,
	"qMode": "S",
	"qStateName": "$"
	}, function(reply,app) {
	var name = "";
	$.each(reply.qHyperCube.qDataPages[0].qMatrix, function(key, value) {
		name = value[0].qText;
	});
	document.getElementById("TSname").innerHTML = name;
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Apr 2021 17:30:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Hypercube-do-not-refresh-after-filter-selection-change/m-p/1802294#M14813</guid>
      <dc:creator>kikko</dc:creator>
      <dc:date>2021-04-23T17:30:54Z</dc:date>
    </item>
  </channel>
</rss>

