Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Extension not getting data

Hi All,

I have an extension which was created for us to create a Jquery dialog box  with information populated in it from the Qlik document from which it was launched. The extension works fine itself, however, I want to recreate the extension with a different name so that we can make some small changes to it for a new Qlik document.

The first part of the code, imports the document data into the extension:

/* global Qva */

/// <reference path="typings/jquery/jquery.d.ts"/>

if (typeof jQuery == 'undefined')

{

        Qva.LoadScript('/QvAjaxZfc/QvsViewClient.aspx?public=only&name=Extensions/RTicketManager/jquery.js', RTicketManager_Init);

} else {

        RTicketManager_Init();

}

// function ShowDialog(message) { line 349

function RTicketManager_Init()

{

        Qva.AddExtension('RTicketManager', function ()

        {

              var extensionRoot = Qva.Remote + (Qva.Remote.indexOf('?') >= 0 ? '&' : '?') + 'public=only' + '&name=' + "Extensions/RTicketManager/";

              Qva.LoadCSS(extensionRoot + "rTicketManager.css");

              var _this = this;

However, when I chenage the lines which mention the extension name of RTicketManager and change it to CTicketManager as below the extsion no longer works :

/* global Qva */

/// <reference path="typings/jquery/jquery.d.ts"/>

if (typeof jQuery == 'undefined')

{

        Qva.LoadScript('/QvAjaxZfc/QvsViewClient.aspx?public=only&name=Extensions/CTicketManager/jquery.js', RTicketManager_Init);

} else {

        RTicketManager_Init();

}

// function ShowDialog(message) { line 349

function RTicketManager_Init()

{

        Qva.AddExtension('CTicketManager', function ()

        {

              var extensionRoot = Qva.Remote + (Qva.Remote.indexOf('?') >= 0 ? '&' : '?') + 'public=only' + '&name=' + "Extensions/CTicketManager/";

              Qva.LoadCSS(extensionRoot + "cTicketManager.css");

              var _this = this;


I have updated the folder name and the Definition.xml file in that folder to have the new name of CTicketManager. When I add the extension, I can see it as a new extension object and the rest of the code seems to fire as the image button shows up on the page. However, when the button is pressed on the new code, the variable _this, is undefined and has a length of 0, so basically nothing is being pulled through into the extension.


Can anyone assist?


0 Replies