Select to view content in your preferred language

Get a value from a layer (with joined table) in a web map

07-24-2023 12:28 PM
Occasional Contributor

Hi, I am creating a form for a layer. In 1 field, I want to get get a value from another layer (with joined table, it's map service published from a ArcGIS Server) in a same web map.


var treeGrid = FeatureSetByName($map,"GROUNDS.SEQ")
var result = Intersects($feature, treeGrid)
return Upper(first(result)."GROUNDS.TI2_MAX_SEQ.SEQ")


Test execution error: Unexpected text literal.. Verify test data.


(It was fine if i am getting a value from another layer without joined table)

Does Field Maps support accessing values from a layer with joined table in Arcade? is my code correct for this?

thanks a lot!!!



0 Kudos
2 Replies
MVP Esteemed Contributor

Your 3rd line there should not have the field name in quotes - that makes it a string.  Also when sending a list of fields to FeatureSet you need to send a list in line 1.  Also I do not see the layer name in line 1.

Then this part TI2_MAX_SEQ I have no idea what that is.  The format should be record.fieldname

Try this

var treeGrid = FeatureSetByName($map, "NameOfLayerInMap", ["GROUNDS.SEQ"])
var result = Intersects($feature, treeGrid)
return Upper(first(result).GROUNDS.SEQ)

Hard to tell since I am not sure what you are trying to go.

Hope that helps

0 Kudos
Occasional Contributor

thanks Doug!

i got the idea, thanks for your help