<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Symbolizing layer features based on another web map layer's attribute in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/symbolizing-layer-features-based-on-another-web/m-p/1212508#M47886</link>
    <description>&lt;P&gt;You can have view layers in AGOL, but only if it's an attribute-based join, actually.&lt;/P&gt;&lt;P&gt;For a spatial relationship, you could use Arcade to calculate a new field, then just re-run the calculation regularly. It would be a simple enough expression that you could schedule a script or notebook to run automatically.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var other_features = FeatuerSetByPortalItem(
    Portal('your portal url'),
    'itemid of the service',
    0, // or whatever layer index it happens to be
    ['fields', 'you', 'want'],
    false
)

return Count(Intersects($feature, other_features)) &amp;gt; 0&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This will return a "true" for features that intersect with those in another layer, "false" for those that do not.&lt;/P&gt;</description>
    <pubDate>Wed, 14 Sep 2022 16:01:06 GMT</pubDate>
    <dc:creator>jcarlson</dc:creator>
    <dc:date>2022-09-14T16:01:06Z</dc:date>
    <item>
      <title>Symbolizing layer features based on another web map layer's attribute</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/symbolizing-layer-features-based-on-another-web/m-p/1212445#M47877</link>
      <description>&lt;P&gt;Hi all,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have two layers in my web map (districts &amp;amp; points). The points layer is coming from Survey123 feature layer.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd like to symbolize those features (in the district layer) based on the intersection with the points layer. (e.g. if intersects red and if doesn't green)&lt;/P&gt;&lt;P&gt;I can't access the attributes of the points layer from the styling Arcade expression of the districts' and creating FeatureSet isn't also available, unlike the Pop-ups.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone know how to do that or have any workaround?&lt;/P&gt;&lt;P&gt;P.S creating an S123 form based on the district layer and having both layers in one Hosted Feature Layer also didn't allow accessing.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Sep 2022 14:31:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/symbolizing-layer-features-based-on-another-web/m-p/1212445#M47877</guid>
      <dc:creator>AhmedShehata3</dc:creator>
      <dc:date>2022-09-14T14:31:03Z</dc:date>
    </item>
    <item>
      <title>Re: Symbolizing layer features based on another web map layer's attribute</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/symbolizing-layer-features-based-on-another-web/m-p/1212467#M47880</link>
      <description>&lt;P&gt;This is one of the Community's "greatest hits", but one which, at the moment, has a very clear, disappointing answer: &lt;STRONG&gt;you can't&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;Due to &lt;A href="https://developers.arcgis.com/arcade/guide/profiles/" target="_blank"&gt;Arcade's different profiles&lt;/A&gt;, there are limitations in some contexts, but not others. In symbology in particular, you can't even access attributes of another feature in the &lt;EM&gt;same &lt;/EM&gt;layer, let alone another layer entirely. You'd need the field "baked in" somehow in order to do this.&lt;/P&gt;&lt;P&gt;Have you considered publishing a hosted view layer of a join?&lt;/P&gt;</description>
      <pubDate>Wed, 14 Sep 2022 15:08:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/symbolizing-layer-features-based-on-another-web/m-p/1212467#M47880</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2022-09-14T15:08:41Z</dc:date>
    </item>
    <item>
      <title>Re: Symbolizing layer features based on another web map layer's attribute</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/symbolizing-layer-features-based-on-another-web/m-p/1212498#M47885</link>
      <description>&lt;P&gt;Hi Josh, thanks for your response.&lt;/P&gt;&lt;P&gt;That's sad!&lt;/P&gt;&lt;P&gt;I don't think I'll be able to use published views because the points layer is coming from a Survey123 form that captures the location (a text naming the district) of the points through an embedded JS code.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd probably need an alternative that's completely implemented on AGOL&lt;/P&gt;</description>
      <pubDate>Wed, 14 Sep 2022 15:51:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/symbolizing-layer-features-based-on-another-web/m-p/1212498#M47885</guid>
      <dc:creator>AhmedShehata3</dc:creator>
      <dc:date>2022-09-14T15:51:51Z</dc:date>
    </item>
    <item>
      <title>Re: Symbolizing layer features based on another web map layer's attribute</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/symbolizing-layer-features-based-on-another-web/m-p/1212508#M47886</link>
      <description>&lt;P&gt;You can have view layers in AGOL, but only if it's an attribute-based join, actually.&lt;/P&gt;&lt;P&gt;For a spatial relationship, you could use Arcade to calculate a new field, then just re-run the calculation regularly. It would be a simple enough expression that you could schedule a script or notebook to run automatically.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var other_features = FeatuerSetByPortalItem(
    Portal('your portal url'),
    'itemid of the service',
    0, // or whatever layer index it happens to be
    ['fields', 'you', 'want'],
    false
)

return Count(Intersects($feature, other_features)) &amp;gt; 0&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This will return a "true" for features that intersect with those in another layer, "false" for those that do not.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Sep 2022 16:01:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/symbolizing-layer-features-based-on-another-web/m-p/1212508#M47886</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2022-09-14T16:01:06Z</dc:date>
    </item>
    <item>
      <title>Re: Symbolizing layer features based on another web map layer's attribute</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/symbolizing-layer-features-based-on-another-web/m-p/1212621#M47897</link>
      <description>&lt;P&gt;Thanks,&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/363906"&gt;@jcarlson&lt;/a&gt;&amp;nbsp;I'm not sure I understood what you mean by "..&lt;SPAN&gt;only if it's an attribute-based join&lt;/SPAN&gt;". In fact, there's a mutual field between the two layers, would that help?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for sharing the code for the spatial relationship. I'll try it out.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Sep 2022 19:02:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/symbolizing-layer-features-based-on-another-web/m-p/1212621#M47897</guid>
      <dc:creator>AhmedShehata3</dc:creator>
      <dc:date>2022-09-14T19:02:00Z</dc:date>
    </item>
    <item>
      <title>Re: Symbolizing layer features based on another web map layer's attribute</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/symbolizing-layer-features-based-on-another-web/m-p/1213192#M47936</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/363906"&gt;@jcarlson&lt;/a&gt;,&amp;nbsp;I managed to create a python notebook with the below code and it works well in getting the intersecting polygon. However, I can't automate it using the ArcGIS Notebook Tasks to overwrite the output feature layer, despite including the Context ({"overwrite":"True"})...&lt;/P&gt;&lt;P&gt;from arcgis.gis import GIS&lt;BR /&gt;gis = GIS("home")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;itemDis = gis.content.get("f464d940fd6................10d09")&lt;BR /&gt;itemDis&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;itemSrv = gis.content.get("306cb1..............489ec1ec")&lt;BR /&gt;itemSrv&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;from arcgis import features&lt;/P&gt;&lt;P&gt;intersectionLayer= features.summarize_data.join_features(target_layer=itemDis,&lt;BR /&gt;join_layer=itemSrv,&lt;BR /&gt;spatial_relationship='intersects',&lt;BR /&gt;output_name='all-clear-intersection',&lt;BR /&gt;context = {"overwrite": True})&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any idea how I can overwrite the output without failing the Notebook Tasks? The output layer will be used in dashboard and web app so I want to maintain using the same layer&lt;/P&gt;</description>
      <pubDate>Thu, 15 Sep 2022 22:19:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/symbolizing-layer-features-based-on-another-web/m-p/1213192#M47936</guid>
      <dc:creator>AhmedShehata3</dc:creator>
      <dc:date>2022-09-15T22:19:41Z</dc:date>
    </item>
  </channel>
</rss>

