I'm attempting to create labels on streets that would show the AADT (Annual Average Daily Traffic) for a street segment. I can easily do this by creating a spatial view that pulls the AADT as the label.
My problem: The year is hardcoded in the label's SQL Query. I would like to pass in the Year value from the browser and have the correct AADT values applied. Is this something that can be done?
As a side note, I've attempted creating a new FeatureLayer on the client using the featureset returned for the street affected. This works fine and I can change the labelinfo for the new featurelayer, but my labels aren't showing. I'm thinking this is a limitation to what the ArcGIS API can do. Is this a feasible solution?
Not totally sure I follow the question, but here is an example displaying a featureLayer from client-side graphics using an Arcade expression to label features with the current year.