For a web application I am working on, I currently have a feature layer with ID 0 (Street Lights) and feature layer with ID 1 (Maintenance Records Table). Multiple records in layer ID 1 are related to ONLY 1 record in layer ID 0 (Street Light have 0 or many maintenance records). I am attempting to perform a query on layer ID 0 (such as, select all of the traffic lights that have a wattage over 400). I then want to perform a query on layer ID 1 and select only the records that are associated with the ones from the first query.
Therefore, I want all of the maintenance records for lights that have a wattage over 400. I understand how to do this with a Relationship Query. However, the final result is that I then want to perform another query on ONLY those selected records based on the date of maintenance.
My problem is that a Query Task only seems to work on a feature layer URL. Is there anyway that anyone knows how to perform a query on another query's results instead of a feature layer URL? Thanks.
UPDATE: I guess another way to ask this is, If I run the selectFeature function on a feature layer, can I run another selectFeature function on only those previously selected features?