Qlik Community

QlikView Extensions

Discussion Board for collaboration on QlikView Extensions.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

venkeytcs
Not applicable

Issue in extension object expression

Hi All,

I created a simple maps extension using Nokia maps. It has 2 dimension (lat and lon) and 2 expression (popupinfo and temp).

The temp expression is always a constant numeric value. (=1)

The popupinformation is for displaying popup whenever the user clicks the pin.

problems

=======

1) if i pass a numeric value in the two expressions, pins are displaying in the map. (this.Data contains some data). but if i pass a string value in any of the two expression, pins are not displaying( this.Data has no records). But if i remove the properties.qvpp file and if i use the default properties page, it is working.

2) whenever i create any extension object it is refreshing 2 times when initiated. why?

3) is there any way to access the qlikview variables. for example, i want to assign the zoom level of the map to the qlikview variable.

Tags (1)
7 Replies
Not applicable

Re: Issue in extension object expression

I have no answer for your first question.

The 2-times refresh at initialization is made since the introduction of extension objects into qlikview and has not been corrected, which is awkward since there is never any change between the two refreshes.

The only way to access a qlikview variable is to use it in a Text or RefValue property of the extension. The API provides a GetAllVariables function (in the Qv.Document object), but it does obviously not work because even the example from the documentation never returns any evaluation of the variable, you can only retrieve name and expression.

venkeytcs
Not applicable

Re: Issue in extension object expression

Hi George,

Thanks for the reply.

@Qliktech (Eric, Dan, Alex, Brian.....)

Anything regarding my first query.

akl
Not applicable

Re: Issue in extension object expression

I'm guessing you are running SR1? If so it's a known bug.

The dynproperties file will generate the wrong value for you if you have more then one expression.

Workaround:

1. Add this line to definition.xml: <PropertiesPage Version="11" File="Properties.qvpp" />

2. Rename DynProperties.qvpp to Properties.qvpp

3. Open the file and change

<div class='prop-grid_span-7 prop-grid_last' style='width:94%;' avq='prop_editexpression:.Chart.Expression.0.1.Definition'></div>

to

<div class='prop-grid_span-7 prop-grid_last' style='width:94%;' avq='prop_editexpression:.Chart.Expression.1.0.Definition'></div>

And you should be up and running again



bmz
Not applicable

Re: Issue in extension object expression

BTW, I'm using the BETA version of SR2 and I can vouch for the fact that this bug is finally fixed in SR2

venkeytcs
Not applicable

Re: Issue in extension object expression

Hi Alex and Brian,

Thanks for the info. Between i noticed one more issue. (this issue is only with this extenstion)

Whenever i open the document(first time), this extenstion object shows blank. After i refresh the page (F5), the maps are displaying and fine. Again i close the document and reopen it, same issue.  Do you guys know why this is happening?

akl
Not applicable

Re: Issue in extension object expression

Ok, I'm probably going crazy...
The code below will render the map fine but if I comment out the alert statement the map fails to load...

Even stranger is that I can't use jQuery selectors either.

Also tried with loading the map package seperatly and using callback functions on sucessful load through nokia.Features.load but no luck.

(function($,Qva){

Qva.LoadScript('http://api.maps.nokia.com/2.2.3/jsl.js', function () {

          Qva.AddExtension('NokiaMaps', function() {

          var _this = this;

          var divName = _this.Layout.ObjectId.replace("\\", "_");

          if (_this.Element.children.length == 0) {

                    var ui = document.createElement("div");

                    ui.setAttribute("id", divName);

                    _this.Element.appendChild(ui);

                    $("#" + divName).css("height", _this.GetHeight() + "px").css("width", _this.GetWidth() + "px");

          } else {

                    $("#" + divName).css("height", _this.GetHeight() + "px").css("width", _this.GetWidth() + "px");

                    $("#" + divName).empty();

          };

 

          nokia.Settings.set("appId", "_peU-uCkp-j8ovkzFGNU");

          nokia.Settings.set("authenticationToken", "gBoUkAMoxoqIWfxWA5DuMQ");

          alert(document.getElementById(divName));

          

          var map = new nokia.maps.map.Display(document.getElementById(divName),{center: [52.51, 13.4],zoomLevel: 10});

 

          });

});

})(jQuery,Qva);

Not applicable

Re: Issue in extension object expression

Hi Alex,

Do we have any option to stop the extension to execute twice when loading.

Thanks in advance