Fields not showing up in the Attribute Inspector

2037
3
Jump to solution
03-29-2013 04:34 AM
ArthurRobinson
New Contributor II
Hello All,

I'm working on a project that requires editing attributes from a feature service.  The feature service has a lot of fields, 105 to be exact.  And since all of the fields need to be available for editing I didn't feel like explicitly naming each field in the FieldInfos section of my LayerInfos for the attribute inspector.  According to the documentation (http://developers.arcgis.com/en/javascript/jsapi/attributeinspector.html) all of the fields should be visible if I don't define anything.

But when I use the following code none of the fields show up in window.

var layerInfos = [{
          'featureLayer': historicBuildingsPolyFL,
          'showAttachments': true,
          'isEditable': true,
          'fieldInfos':[]
        }];

Please help,

Artie
0 Kudos
1 Solution

Accepted Solutions
JakeSkinner
Esri Esteemed Contributor
Hi Artie,

For your FeatureLayer, do you have the 'outFields' property set to "*"?  Ex:

var pointsOfInterest = new esri.layers.FeatureLayer(featLayer,{           mode: esri.layers.FeatureLayer.MODE_ONDEMAND,            outFields: ["*"]         });

View solution in original post

3 Replies
MattLane
Occasional Contributor II
Hey Artie, I haven't tested it, but have you tried removing the fieldInfos key altogether?
0 Kudos
JakeSkinner
Esri Esteemed Contributor
Hi Artie,

For your FeatureLayer, do you have the 'outFields' property set to "*"?  Ex:

var pointsOfInterest = new esri.layers.FeatureLayer(featLayer,{           mode: esri.layers.FeatureLayer.MODE_ONDEMAND,            outFields: ["*"]         });
ArthurRobinson
New Contributor II
Hey Matt, I tried that last week but got the same result.

But, Jake your suggestion seemed to fix the issue.  Once I added the Outfields property everything showed up.

Thanks,

Artie
0 Kudos