5

I have a map server published on ArcGIS Server and it has a Poles layer. It has following fields:

Images of poles layer attributes

Now when I am trying to run any query against this layer by passing queries like

Owner IS NOT NULL 

or

Owner = 'Utility'

I am getting this error while I am sure the Owner is not NULL and all has value of utility

Failed to execute query.

enter image description here

Can you please let me know what I am doing wrong?

4
  • 1
    "return fields" always has to be set. Are you setting it? I always add * in there when doing a quick and dirty test
    – Dowlers
    Commented Sep 10, 2018 at 22:32
  • 1
    @Dowlers Return fields doesn't have to be set. If left empty, the geometry and the display field will be returned by default.
    – Berend
    Commented Nov 1, 2018 at 8:18
  • @Berend Your right, it works without * at 10.5.1. I could have sworn at 10.3.1 I always had to enter * but I don't have an installation to test on. Thanks for letting me know.
    – Dowlers
    Commented Nov 1, 2018 at 14:00
  • 1
    @Dowlers Actually that wouldn't have surprised me, but I just checked an old 10.2 installation and that works without * too. It's the where that's required, and of course, if you want to see some useful information, you need * anyway.
    – Berend
    Commented Nov 1, 2018 at 14:51

1 Answer 1

2

the best way to check an ArcGIS REST API endpoint is to simply add Where 1=1. In this way you should be able to get every possible result.

If you add the * on the out fields as it is mentioned in the commends you will also get all the attributes.

Finally, If you want to check for strings the

Owner = 'Utility'

should work. Check again as we discussed with all the output fields and you should be able to find the issue with this field.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.