AnsweredAssumed Answered

Retrieving domain value attributes from Relationship Query

Question asked by wherewhy on Jun 22, 2012
Latest reply on Jul 19, 2012 by wherewhy
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)  ???

Outcomes