Select to view content in your preferred language

Arcade error when using FeatureSetByName to get related data

370
1
06-26-2024 10:26 AM
aduyvesteyn
Emerging Contributor

I am working with a feature layer and a separate layer that intersect spatially. The layer I am trying to use in the pop-up is "Civic Addresses" and the attribute I'm trying to add in the pop-up is "FULL_ADDRESS". 

 

I keep getting the following error:

 

Execution Error: Runtime Error: Cannot call member method on null. FULL_ADDRESS

aduyvesteyn_0-1719422760212.png

 

0 Kudos
1 Reply
KenBuja
MVP Esteemed Contributor

What might be happening is the editor uses the first feature in the dataset for the run. If that feature doesn't intersect the "Civic Addresses" data, the variable int will be null. You should test for that

return iif(IsEmpty(int), 'No intersecting feature', int.FULL_ADDRESS)
0 Kudos