Select to view content in your preferred language

Can intersect be used within one service (in a web map) or do the endpoints have to be added individually?

2417
12
09-16-2021 11:35 AM
Labels (1)
AdamGebhart
Frequent Contributor

Is it possible to set up an Arcade expression with the intersect function that references another layer within the same service as the features in which the expression is applied?  Or, do you have to add each endpoint within the service individually in order to make the expression work?

For example, I have a service with three layers: address points, food inspector zones, and watershed inspector zones.  If I add each of the endpoints individually, the following expression (in the address points) returns the desired value (from the food inspector zone layer):

AdamGebhart_0-1631816860005.png

However, if I add the whole service to my map and set up the same expression on the address points there it does NOT work.  I get this error:

AdamGebhart_1-1631817031312.png

Does it simply not work within a service?  Or do I have a wrong parameter?

 

0 Kudos
12 Replies
AdamGebhart
Frequent Contributor

@XanderBakkerThanks for checking further into that.  Your example includes an ESRI service example, right?  Should I be able to use my own REST services (published with Server) with some tweaks to your expression?

I'm surprised you can't access the services as they're public.

0 Kudos
XanderBakker
Esri Esteemed Contributor

Hi @AdamGebhart ,

You should be able to use the code after you create the item in your portal (this is just a reference to the data). You will have to change the ItemID to the one you create and the field and logic you want to apply after accessing the layer. 

I think the reason that I cannot access the website, is since it blocks access from Colombia: 

XanderBakker_0-1643236118375.png

 

0 Kudos
AdamGebhart
Frequent Contributor

@XanderBakker 

Thanks for your help.  I haven't been able to try this yet will get around to eventually.

Regarding the Colombia thing - are you in Colombia?  Or is it saying my connection is in Colombia?  I'm in the US.

0 Kudos