3 Replies Latest reply: Nov 1, 2017 11:05 AM by Jesper Snihs RSS

    Error with Field API

    Jesper Snihs

      I get an error while using getData() with the Field API.

      I have followed the example given on https://help.qlik.com/en-US/sense-developer/September2017/Subsystems/APIs/Content/CapabilityAPIs/FieldAPI/getData-method…

       

      The error shows up as soon as I do any kind of selection on a field.

       

      Even this simple example gives the error:

      define( [
              "qlik",
              "jquery",
              "text!./template.html"
          ],
          function ( qlik, $, template ) {
              "use strict";
      
              var app = qlik.currApp(this);
      
              return {
                  template: template,
                  definition: {
                      type: "items",
                      component: "accordion",
                         items: {
                          dimensions: {
                              uses: "dimensions"
                          }
                      }
                  },
                  support: {
                      snapshot: true,
                      export: true,
                      exportData: false
                  },
                  paint: function () {
      
                      var field = app.field("Dim1").getData();
      
                      return qlik.Promise.resolve();
                  },
                  controller: ['$scope', function ( $scope ) {
      
                  }]
              };
      
          } );
      
      

       

      This is the error given:

      field-issue.PNG

       

      To reproduce the error:

      1. I use the Qlik default data in this example ( CTRL + 00)

      2. Add the extension to a sheet

      3. Add a dimension to the extension

      4. Add a filter pane with any dimension

      5. Make a selection in the filter pane

       

      Any idea what is causing this issue?