Select to view content in your preferred language

FeatureLayer and Tables

263
1
08-28-2025 09:24 AM
MauroSantarossa
Emerging Contributor

Hi everyone,
 sorry for the newbie question.
I have a FeatureService containing a FeatureLayer "Pipelines" with attributes: id, code, pressure ... and a Table "Report" with attributes: id, pipe_id, report_code, where 0 or N reports are listed for each "Pipeline" feature (relation via attribute pipe_id).

I'd like to know the best way to display on a map the "Pipelines" FeatureLayer, showing only the features with a report_code="X."

Does the relationship need to be defined in the FeatureService, or can it also be defined directly on the client side?

Keep in mind that there may be many features to load.

Thanks in advance for your help 🙂

0 Kudos
1 Reply
JeffreyThompson2
MVP Frequent Contributor

https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#definiti...

You can filter a FeatureLayer by creating a definitionExpression.

GIS Developer
City of Arlington, Texas