AnsweredAssumed Answered

relationshipQuery not executing - returns TypeError

Question asked by abrown31 on Nov 26, 2012
Latest reply on Nov 27, 2012 by abrown31
Hello,

I'm trying to execute a relationshipQuery against a featureLayer. I narrowed the featureLayer down to one point that I know has data within the related database view (I can see the data within the Identify Tool in ArcMap).

Anyhow, once my code executes the queryRelatedFeatures, it throws an error code using the onError event for the featureLayer:

TypeError: Object 1564 has no method 'join'


1564 being the OBJECTID of my single point.

Also, just to note, the featureLayer has a defined definitionQuery to limit it to this one point.

var joined = objectID.toString(); //contains a list of OBJECTIDs. There is only one right now         nonDetectsLayer.setDefinitionExpression("OBJECTID IN (" + joined + ")");         var relatedQuery = new esri.tasks.RelationshipQuery();         relatedQuery.outFields = ["*"];         relatedQuery.relationshipId = 0;         relatedQuery.objectIds = joined;         nonDetectsLayer.queryRelatedFeatures(relatedQuery, function (relatedRecords) {             console.log("related recs: ", relatedRecords);             if (!relatedRecords.hasOwnProperty(features[0].attributes.OBJECTID)) {                 console.log("No related records for ObjectID: ", objectID);             } //if         }); //queryRelatedFeatures


Has anybody had any experience with this? Any help?

Thanks,
Andrew

Outcomes