AnsweredAssumed Answered

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

Question asked by csergent08 Champion on May 5, 2015
Latest reply on May 7, 2015 by csgeosol1

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;
            app.attributesModal.modal("show");
            document.getElementById("address").value = address;
            console.log(supportId);
            console.log(type);
            console.log(address);
        });

 

This feature layer is: http://maps.decaturil.gov/arcgis/rest/services/test/StreetSignTest/FeatureServer/1

It has a unique SUPPORTID.

The layer of sign that I want to get records from is: http://maps.decaturil.gov/arcgis/rest/services/test/StreetSignTest/FeatureServer/0

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?

Outcomes