Hi,
I am using a rest query on my feature service. I am entering an object id and it returns only one field value and the geometry.
How do I get more fields? And why, why, why is this confusing? This should be the simplest thing ever. lol.
Solved! Go to Solution.
Adding on to Randy's comment...are you specifying the outFields variable to show the field you want returned?
Query (Feature Service/Layer)—ArcGIS REST API: Services Directory | ArcGIS for Developers
There is an option to use a wildcard (outFields=*) or specify each field (outFields=AREANAME,ST,POP2000) individually.
Without seeing the actual query you are using, I assume you are specifying a specific object id number in your where clause ( OBJECTID = 123 ) which would only return one record. You can remove any reference to the object id in your where clause to retrieve all records; or use greater than or less than to get a group of rows ( OBJECTID > 0 ).
Adding on to Randy's comment...are you specifying the outFields variable to show the field you want returned?
Query (Feature Service/Layer)—ArcGIS REST API: Services Directory | ArcGIS for Developers
There is an option to use a wildcard (outFields=*) or specify each field (outFields=AREANAME,ST,POP2000) individually.
Yes! I forgot about outfields! Thank you Christian. I'm amazed at what i can forget! This was really frustrating for me the other day! I knew it had to be something basic i was forgetting. Thanks again!
I'm happy I could help!