0 Replies Latest reply: Feb 9, 2018 5:26 AM by Jesper Snihs RSS

    Access to extension object ID in properties.js

    Jesper Snihs

      Is there any way that I can access the extension object id in properties.js?


      I'm building a custom component in properties.js where I need to know the Id of the extension object.



      define( [
          function (qlik) {
          var customComponent = {
              type: "string",
              component: {
                  template: '<div>Custom Component Template</div>',
                  controller: ['$scope', function ( $scope ){
                      // I want to get access to the extension object ID here
              ref: "customComponent",
              defaultValue: "default"
          var myCustomSection = {
              component: "expandable-items",
              translation: "Widget.Settings",
              items: {
                  header1: {
                      type: 'items',
                      translation: "Component",
                      items: {
                          item1: customComponent
          return {
              type: "items",
              component: "accordion",
              items: {
                  customSection: myCustomSection
      } );


      I do not want to use $rootScope from the main.js file since if you have the same object multiple times on the sheet the $rootScope variable is being overwritten (maybe there is a way to avoid this and have a unique $rootScope for current extension?)