0 Replies Latest reply: Feb 24, 2015 7:43 AM by Ezequiel Gomes RSS

    How to create a field extension

      Hi,

       

      I'm on a project where the users will only access to the dashboards through the browser of its choice. One of the requirements of this project is related to the presentation of Dimension Selectors: we must heavily customize the aspect of our filters, in particular, one that resembles to a modern dropdown list. For this reason, I'm developing a few object extensions so I can have total control on the presentation of this objects.

       

      To develop this object I would need to access to all the values of a certain field, for instance, the Country. Accordingly to the properties set by the user (which are defined in the extension's definition file) , I would like to show only selected values or the optional and excluded ones also. To achieve this, I've read the Qlikview Ajax Javascript Library reference (JsDoc Reference - Getting Started) but I haven't found any function that could help me. Every function is mean't to be used in objects that show data accordingly to the current document selections. But I need to obtain only the possible values of a specific field (and the state of each of its values).

       

      So, I've analysed the document object using a browser inspector and found the  function "GetField" which accepts a @name (field name) and a @onDataLoaded callback. This is working but with some issues: my extensions rely on external javascript framework like jquery ui, select2, and others custom made ones, and sometimes, when the @onDataLoaded  callback is called (during some page updates, field selections), some of the objects defined in those external javascripts APIs doesn't yet exist (I load them before I add the extension ("Qva.AddExtension") using the function "Qva.LoadScript") which lead to the failure of my extensions. This issue only happens sometimes but radomly.

       

      Because this funciton I'm using isn't documented I would like to ask you guys if this is the correct way of achieve what I want.

       

       

      Thank you in advance