Attribute Table Widget Not Honoring Field Visibility Params - WAB 1.3 Dev Edition

2263
4
02-29-2016 11:46 AM
DavidColey
Frequent Contributor

Hi - Is there some trick to getting the Attribute Table widget to honor field visibility settings in v 1.3?  It appears my visibility values are set correctly, but then after signing out and signing back into the WAB, feature layer system attributes like OBJECTID, GlobalID, etc re-appear in the attribute table even though I have set their visibility to false.

Thanks-

David

4 Replies
DavidColey
Frequent Contributor

Hi again all - sorry to generate my own reply, but has anyone else had issues with the Attribute Table and column visibility settings?

0 Kudos
JamesCrandall
MVP Frequent Contributor

Hi David --- probably not what you want to hear, but I cannot reproduce this issue with my install of WAB1.3 on the Attribute Table widget.

I was sure to clear my browser's (Chrome) cache, re-launched nodejs session, even had to re-enter my portal address --- but the settings I had configured for the widget and service had "stuck" just fine for me.

This was tested on a web layer that is saved to My Content and shared out.  That web layer was created by adding a Map Service to a WebMap, setting symbology and other properties, then saving it to My Content (as a Feature Service).

I'll give it a try with just a straight-up Map service as well.

Edit: It looks like it takes any and all services (Feature or Map service) from the source WebMap and makes them all Feature Services because you cannot configure a specific Map Service like I was thinking.  Anyway -- I don't seem to have the issue you are experiencing.

0 Kudos
DavidColey
Frequent Contributor

Oh hey Jamie how are you?  Thanks, yeah I've done all that.  Yes, I am working strictly with publically-shared feature layers in my webmap. In looking at the config.json, the layer infos ordering for the "show" boolean changes.  For example, here is the layer infos for an Open Rezone Petitions poly-layer in my planning services wab:

 "layerInfos": [
    {
      "name": "Open Petitions",
      "id": "SarcoPlanning_4226_2114",
      "layer": {
        "url": "https://ags2.scgov.net/arcgis/rest/services/ScOperational/SarcoPlanning/MapServer/17",
        "fields": [
          {
            "show": false,
            "name": "OBJECTID",
            "alias": "OBJECTID"
          },
          {
            "show": true,
            "name": "PetitionType",
            "alias": "Petition Type"
          },
         {
            "show": false,
            "name": "Shape",
            "alias": "Shape"
          },
          {
            "show": false,
            "name": "Shape_Length",
            "alias": "Shape_Length"
          },
          {
            "show": false,
            "name": "Shape_Area",
            "alias": "Shape_Area"
          }
        ]
      },
      "show": false
    },

And for a communications tower point layer:

   {
      "name": "Communication Towers",
      "id": "SarcoPlanning_2620",
      "layer": {
        "url": "https://ags2.scgov.net/arcgis/rest/services/ScOperational/SarcoPlanning/MapServer/23",
        "fields": [
          {
            "name": "OBJECTID",
            "alias": "OBJECTID",
            "show": false
          },
          {
            "name": "FEATURETYPE",
            "alias": "Tower",
            "show": false
          },

          {
            "name": "Shape",
            "alias": "Shape",
           "show": false
          }
        ]
      },
      "show": false
    },

Notice how the positioning of the "show" value appears before the name and alias for the petitions layer, but after the name and alias values for point layer.  Ordering shouldn't matter in the layer infos for the values, but the point layer visibility is honored, and the petitions (poly) layer is not.   Obviously I can control visibility in my services, but that's not really the point, is it?  It's just very buggy, maybe I can find some help at Dev next week-

DavidColey
Frequent Contributor

Just a quick follow up:

I sorted every value pair for every fields array for every feature layer of the Attribute Table config.json such that name; alias; show are in the same order for each.  In my case, for most layers the show value is honored.  For 4 or 5 of the layers, it is not.

More info:

The visible attributes are the same in my web maps' configure attributes, i.e showing the same attributes in my web maps table as I have the config.json set.

0 Kudos