Select to view content in your preferred language

Exclude columns in ESRI map service Query

967
4
03-03-2021 03:31 AM
JayakumarPD
Frequent Contributor

Hi,

  Is it possible to exclude the columns in  map service query, 

For Example: I have a service, with

                                       Service 1: Name, Department and ID

                                       Service 2: Name, Forest, Species and ID

                                       Service 3: Society, Asset, Culture and ID

I am calling this is a loop, when I give asterisk (*), then all columns are coming for identifier template, but I don't want ID from any service.  Is there any way.

Thankyou

0 Kudos
4 Replies
JayJohnsonWashoeCounty
Frequent Contributor

Clearly you can't use the * and still exclude any of the fields (ID in your case).  I think you will have to explicitly specify the fields you want returned in the query.

Jay
Washoe County GIS
0 Kudos
JayakumarPD
Frequent Contributor

Explicitly we can include but how to exclude 

0 Kudos
jcarlson
MVP Esteemed Contributor

The fields are all there in the service JSON. Would it be possible to pull all the field names and then just drop 'ID' from the array before submitting it as your out_fields param?

- Josh Carlson
Kendall County GIS
0 Kudos
JayakumarPD
Frequent Contributor

is it possible to share code snippet or any reference link

0 Kudos