AnsweredAssumed Answered

Executing multiple queryTasks with a relationshipTask in the middle

Question asked by abrown31 on Nov 28, 2012
Latest reply on Nov 29, 2012 by abrown31
I'm trying to execute multiple query tasks, where the second queryTask depends on a relationshipTask result from a featureLayer after the first queryTask. It'll look something like this


queryTask1()
     relationshipTask(necessary input from queryTask1 result)
queryTask2(necessary input from relationshipTask within queryTask1)

I tried using the ESRI example, "Multiple query results with deferred list", but I cannot figure out how to do it the way that works for me.

I'm querying a view within the first queryTask to retrieve objectids and an integer, then I'm using a relationshipQuery with the objectids to retrieve a list of strings. I'm using the list of strings to query a 3rd view within the second queryTask to display the results in a dojo table.

Is using a deferredList the way to go? If so, could somebody please provide an example of how to do this?

Thanks,
Andrew

Outcomes