Search code examples
javascriptjqueryrequirejsrequireqliksense

Qlik Sense error in creating extension


I have made an extension that takes in 2 dimensions and 2 measures, but when I go to add a dimension or measure, i get the following error

enter image description here

clicking on a field gives me this... (qInterColumnSortOrder error) enter image description here

Here is my simple js code

 define(["jquery", "text!./com-qliktech-helloworld.css","./d3.min"], function($, cssContent) {'use strict';
  $("<style>").html(cssContent).appendTo("head");

  return {
  initialProperties : {
  version: 1.0,
  qHyperCubeDef : {
  qDimensions : [],
  qMeasures : [],
  qInitialDataFetch : [{
  qWidth : 4,
  qHeight : 1000
  }]
  }
  },
  definition : {
  type : "items",
  component : "accordion",
  items : {
  dimensions : {
  uses : "dimensions",
  min : 2,
  max : 2
  },
  measures : {
  uses : "measures",
  min : 2,
  max : 2
  },
  sorting : {
  uses : "sorting"
  },
  settings : {
  uses : "settings"
  }
  }
  },
  paint: function ($element, layout) {


  }
  };


} );

Solution

  • I guess you have added the properties after you have first added the extension to the sheet.

    Do the following: - Remove the extension from your sheet - Do a hard refresh in your browser (clearing the cache, ideally open Chrome Dev Tools and enable the option to disable the cache while Chrom Dev Tools are open). - Add the extension back to the sheet - Then it should work.

    This is a common behavior if you change the properties of an extension, those properties will be added to the application when adding it first to a sheet and will not be properly updated.

    Hope this helps.