AnsweredAssumed Answered

Error in FeatureTable, generating column headers

Question asked by schlot on May 20, 2016
Latest reply on Nov 25, 2016 by CGSJohnson

I am using FeatureTable for the first time, attempting to use it instead of dGrid (just for fun, you know).   My AGS server is still at 10.2.2.  I'm using version 3.16 of the API.

 

My featureLayer is defined as:

app.pointFLayer = new FeatureLayer (pathName+"/arcgis/rest/services/DHSS/mysecure/LayerMapServer/0", {
  id: "resFLayer",
  outFields: ["*"],
  opacity: 0.0
});

I have a load function on this layer to generate the table:

//populate the table in the footer

  app.pointFLayer.on ("load", function (fl) {
    myFeatureTable.initTable();
  });

Here's that function:

define([
"dojo/dom", 
"esri/dijit/FeatureTable"
], function(dom, FeatureTable){
    return {
        initTable: function(){
            app.Table = new FeatureTable({
                featureLayer: app.pointFLayer,
                map: app.map,
                dateOptions: {
                    datePattern: 'MMMM d, y'
                },
            //    outFields: ["Kit_Serial_Number", "Address", "City", "State", "Zip", "County", "Analysis_Date", "Final_Result", "Loc_Code"],
                fieldInfos: [{
                    name: 'Kit_Serial_Number',
                    alias: 'Kit Serial Number'
                }, {
                    name: 'Address',
                    alias: 'Address'
                }, {
                    name: 'City',
                    alias: 'City'
                }, {
                    name: 'State',
                    alias: 'State'
                }, {
                    name: 'Zip',
                    alias: 'ZIP'
                }, {
                    name: 'County',
                    alias: 'County'
                }, {
                    name: 'Analysis_Date',
                    alias: 'Analysis Date'
                }, {
                    name: 'Final_Result',
                    alias: 'Final Result'
                }, {
                    name: 'Loc_Code',
                    alias: 'Location Code'
                }]
            }, dom.byId('tableDiv'));
            app.Table.startup();
            return app.Table;
        }
    }
});

 

There are a lot of points in this layer, over 20K.  I know this isn't great, but it's what the users asked for.  I'm going to add some query capabilities that will eventually limit the results to something more reasonable.  In the meantime, this processes a while and eventually gives me this error: 

 

init.js:199 SyntaxError: Unexpected char ] in label.dgrid-hider-menu-label.hider-menu-label-0[for=[object HTMLDivElement]_grid-hider-menu-check-0](…) "SyntaxError: Unexpected char ] in label.dgrid-hider-menu-label.hider-menu-label-0[for=[object HTMLDivElement]_grid-hider-menu-check-0]

    at q (https://js.arcgis.com/3.16compact/put-selector/put.js:4:496)

    at r._renderHiderMenuEntry (https://js.arcgis.com/3.16compact/dgrid/extensions/ColumnHider.js:4:32)

    at r._renderHiderMenuEntries (https://js.arcgis.com/3.16compact/dgrid/extensions/ColumnHider.js:3:115)

    at r.renderHeader (https://js.arcgis.com/3.16compact/dgrid/extensions/ColumnHider.js:6:243)

    at m (https://js.arcgis.com/3.16compact/init.js:96:92)

    at A.renderHeader (https://js.arcgis.com/3.16compact/dgrid/extensions/ColumnResizer.js:6:363)

    at Object.h.around.advice (https://js.arcgis.com/3.16compact/init.js:234:254)

    at g.(anonymous function).h [as renderHeader] (https://js.arcgis.com/3.16compact/init.js:234:44)

    at h._updateColumns (https://js.arcgis.com/3.16compact/dgrid/Grid.js:13:215)

    at h._setColumns (https://js.arcgis.com/3.16compact/dgrid/Grid.js:12:340)

    ----------------------------------------

    rejected at a (https://js.arcgis.com/3.16compact/init.js:190:337)

    at k (https://js.arcgis.com/3.16compact/init.js:190:89)

    at q (https://js.arcgis.com/3.16compact/init.js:189:357)

    at resolve (https://js.arcgis.com/3.16compact/init.js:191:441)

    at https://js.arcgis.com/3.16compact/esri/dijit/FeatureTable.js:22:50

    at r._resolve (https://js.arcgis.com/3.16compact/esri/layers/FeatureLayer.js:159:236)

    at https://js.arcgis.com/3.16compact/esri/layers/FeatureLayer.js:162:498

    at c (https://js.arcgis.com/3.16compact/init.js:66:221)

    at d (https://js.arcgis.com/3.16compact/init.js:66:10)

    at resolve.callback (https://js.arcgis.com/3.16compact/init.js:67:350)

    ----------------------------------------

Error

    at then.b.then (https://js.arcgis.com/3.16compact/init.js:192:253)

    at D._queryFeatureLayerSetup (https://js.arcgis.com/3.16compact/esri/dijit/FeatureTable.js:22:231)

    at https://js.arcgis.com/3.16compact/init.js:167:296

    at c (https://js.arcgis.com/3.16compact/init.js:66:221)

    at d (https://js.arcgis.com/3.16compact/init.js:66:10)

    at resolve.callback (https://js.arcgis.com/3.16compact/init.js:67:350)

    at c (https://js.arcgis.com/3.16compact/init.js:66:436)

    at d (https://js.arcgis.com/3.16compact/init.js:66:10)

    at resolve.callback (https://js.arcgis.com/3.16compact/init.js:67:350)

    at Object.e._resDfd (https://js.arcgis.com/3.16compact/init.js:749:238)"

 

I've tried with the outFields defined and with them commented out.  There aren't any characters ] in my field names. The service is secure, but see my attachment for the field names for this layer.  Hopefully someone spots something I've missed. 

Attachments

Outcomes