Select to view content in your preferred language

Can Esri feature / map services return domain values rather than codes

366
2
03-08-2019 11:52 AM
PeterLen
Frequent Contributor

Hello - We are using ArcGIS Server v10.4 and publish both Esri feature and map services.  Some of our feature class data uses domains and we store the code from the domain in the database.  When you do a query from the service endpoint, the service will return exactly what is in the datastore (ie, the domain codes).  Our client application, as well as the ArcMap attributes table, displays the domain value rather than the code because the client goes through a process of translating domain values.  

What we are wondering is if there is possibly some sort of service configuration item or query flag that will tell the service to return the domain value rather than the domain code.  Again, Esri already does this when looking at the data in ArcMap via the attributes table.

Does anyone have any definitive answer to this, one way or another?

Thanks - Peter

0 Kudos
2 Replies
RobertBorchert
Honored Contributor

Something must be set up incorrectly.

What type of database is your data in.  SDE or Filegeodatabase.

You said your data is in a datastore but you loaded the domains to the database.  Can you load your domains into the datastore/

0 Kudos
PeterLen
Frequent Contributor

Robert - Thanks for the reply.  I should have been more precise.  We are using Oracle 11g for the data store.  When the domains are created via ArcCatalog, that domain data is stored somewhere in the dark bowels of the Esri SDE schema in Oracle.  Then when the feature class fields are created in ArcCatalog, the previously created domains can be assigned to the fields.  The feature class field values are being populated with the domain codes from the client, so if you were to look at the Oracle database table in SQL Developer for the feature class, you would see a 'code' value.  For example, the domain may be an integer domain where the codes  are 1, 2, 3, 4 and values (or domain descriptions) are 'red', 'blue', 'green', 'yellow'.  The value 1, 2, 3, 4 is what gets stored in the table row.  When you use ArcMap and load the feature class and then look at the attribute table, it will list the values 'red', 'blue', 'green', 'yellow'.  So ArcMap somehow knows that the field has an associated domain and is displaying the value/description rather than the code.  When we do a query via the service endpoint, however, only the code is returned.  We would like to know if it is possible for the service to return the value/description, just like the ArcMap client does.

Thanks - Peter

0 Kudos