How do I Step through related records in a Feature Layer?

05-05-2015 02:37 PM
Regular Contributor III

I believe this will involve the query task.

I have code that will provide me information on street supports:

var supportId, type, address;

        app.supportLayer.on("click", function (evt) {

            supportId = evt.graphic.attributes.SUPPORTID;

            type = evt.graphic.attributes.TYPE;

            address = evt.graphic.attributes.ADDRESS;


            document.getElementById("address").value = address;





This feature layer is:

It has a unique SUPPORTID.

The layer of sign that I want to get records from is:

In this table, the related field is SUPPORTID

An example of what I have is I want to search for the value of SUPPORTID and get all records that match the SUPPORTID in the streetSigns layer. I have four street signs with a supportId of 1903. How would I query those four street signs and then display one at a time based on a key push, so I could see one record at a time?

Tags (2)
1 Reply
Frequent Contributor


Regarding the relationship query, have you had a chance to review the Esri demo?

Query related records | ArcGIS API for JavaScript