Retrieving domain value attributes from Relationship Query

1643
1
Jump to solution
06-22-2012 05:25 AM
DarrenMackiewicz
Occasional Contributor
I'm performing a relationship query and attempting to get at the attribute DOMAIN values, but all I am getting is the numeric domain value code.

My process so far is :

- (void) queryTask:(AGSQueryTask*)queryTask operation:(NSOperation*)op didExecuteWithRelatedFeatures:(NSDictionary*) relatedFeatures {
   
    //The item for which we are finding related features
    NSNumber* valveID = self.featureOID;
   
    AGSFeatureSet* results = [relatedFeatures objectForKey: valveID];
  
   
    AGSGraphic *graphic = [results.features objectAtIndex:0];
    NSLog(@"graphic: %@",graphic);
   
 
In the Log, here is what I get :

2012-06-21 15:44:31.482 Municipal Inspection[37564:11f03] graphic: geometry: (null), symbol: (null), attributes: {
    FEATUREID = 49;
    OBJECTID = 3;
    RELATEFIELDDOMAIN = 1;
    RELATEFIELDNORMAL = TEST3;
}, visible: 1
2012-06-21 15:44:31.483 Municipal Inspection[37564:11f03] graphic: geometry: (null), symbol: (null), attributes: {
    FEATUREID = 49;
    OBJECTID = 2;
    RELATEFIELDDOMAIN = 2;
    RELATEFIELDNORMAL = TEST2;
}, visible: 1
2012-06-21 15:44:31.484 Municipal Inspection[37564:11f03] graphic: geometry: (null), symbol: (null), attributes: {
    FEATUREID = 49;
    OBJECTID = 1;
    RELATEFIELDDOMAIN = 1;
    RELATEFIELDNORMAL = TEST;
}, visible: 1


The RELATEFIELDDOMAIN is bringing back the value of 1, rather than the coded value. 

When I bring up the table in REST, for the RELATEFIELDDOMAIN attribute, it shows the Coded Values (Asphalt and Concrete) - but when I run the relationship query, it only brings back the numeric values (1 and 2).

Fields:

    OBJECTID (Type: esriFieldTypeOID, Alias: OBJECTID, Editable: False)
    FEATUREID (Type: esriFieldTypeDouble, Alias: FEATUREID, Editable: True)
    RELATEFIELDNORMAL (Type: esriFieldTypeString, Alias: RELATEFIELD1, Length: 50, Editable: True)
    RELATEFIELDDOMAIN (Type: esriFieldTypeString, Alias: RELATEFIELD, Length: 50, Editable: True, Domain: Coded Values: [1: ASPHALT], [2: CONCRETE])


Is it possible to get the string code value (asphalt or concrete) rather than the integer value (1 or 2)  ???
0 Kudos
1 Solution

Accepted Solutions
DarrenMackiewicz
Occasional Contributor
This is a known deficiency in the API and an enhancement request has been added. I encourage you to add your own enhancement request to ensure Esri knows of the criticality of this deficiency.
Thank you.

View solution in original post

0 Kudos
1 Reply
DarrenMackiewicz
Occasional Contributor
This is a known deficiency in the API and an enhancement request has been added. I encourage you to add your own enhancement request to ensure Esri knows of the criticality of this deficiency.
Thank you.
0 Kudos