Hide ObejctID in 10.2????

2011
8
Jump to solution
01-16-2014 11:17 AM
christymc
New Contributor
In 10.0, I was able to uncheck the OBJECTID field in the MXD and the resulting WFS would not have this feild. This would validate against the associated data schema.  This is not the case in 10.2.  I need to turn off this field so that the WFS will validate against my schema (which does not have the ObjectID field listed). Can anyone please help? Anyone out there able to turn off this field?
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
WilliamCraft
MVP Regular Contributor
For whichever layer it is in your MXD that you are attempting to hide the OBJECTID field for, try creating a query layer instead and specify the fields you do want in the SQL which comprises the query layer.  There is a wizard to create the query layers; you'll need to reference the Esri help if you've not found this option in ArcMap before.  You might not be required to actually have the source feature class in your MXD in order to create the query layer... I can't recall as it's been a while since I've done this.  If you are required to have it in the TOC to build the query layer, just uncheck it before you publish your MXD as a service.

View solution in original post

0 Kudos
8 Replies
christymc
New Contributor
Even though unchecking the fields in Properties will hide the field in the Open Attribute table in the MXD, they still show up in the WFS. Is this a 10.2 bug?
0 Kudos
christymc
New Contributor
I've tried exporting the feature class to an XML workspace and manually moving the ObjectID field. Even then, the WFS response spits ObjectID out just before the Shape field.  I can't seem to force it to put this field last in 10.2.
0 Kudos
WilliamCraft
MVP Regular Contributor
Have you tried building a query layer in your map document with only the fields you want to "see"?
0 Kudos
christymc
New Contributor
Have you tried building a query layer in your map document with only the fields you want to "see"?


Are you saying a query layer is what I should build the WFS on?
0 Kudos
WilliamCraft
MVP Regular Contributor
For whichever layer it is in your MXD that you are attempting to hide the OBJECTID field for, try creating a query layer instead and specify the fields you do want in the SQL which comprises the query layer.  There is a wizard to create the query layers; you'll need to reference the Esri help if you've not found this option in ArcMap before.  You might not be required to actually have the source feature class in your MXD in order to create the query layer... I can't recall as it's been a while since I've done this.  If you are required to have it in the TOC to build the query layer, just uncheck it before you publish your MXD as a service.
0 Kudos
christymc
New Contributor
Thanks much for the reply. It'll try that out.  Just not really sure why this is happening in 10.2 when in 10.0 and 10.1, one just needed to un-check the layer name in the MXD to make it disappear from the WFS GetFeature request...
0 Kudos
christymc
New Contributor
For whichever layer it is in your MXD that you are attempting to hide the OBJECTID field for, try creating a query layer instead and specify the fields you do want in the SQL which comprises the query layer.  There is a wizard to create the query layers; you'll need to reference the Esri help if you've not found this option in ArcMap before.  You might not be required to actually have the source feature class in your MXD in order to create the query layer... I can't recall as it's been a while since I've done this.  If you are required to have it in the TOC to build the query layer, just uncheck it before you publish your MXD as a service.


That worked. Thanks so much for the advice!
0 Kudos
WilliamCraft
MVP Regular Contributor
Great, I'm glad to hear it worked for you.  Please mark the correct answer with the green check and have a great day!
0 Kudos