<?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 How to set a value in an attribute table when a point is put on the map and intersects a line? in Attribute Rules Questions</title>
    <link>https://community.esri.com/t5/attribute-rules-questions/how-to-set-a-value-in-an-attribute-table-when-a/m-p/1621589#M1778</link>
    <description>&lt;P&gt;Hello, I have written a rule that is supposed to set the value in the point attribute table to 100 if it intersects a line. I have written this script so far, but it keeps evaluating to false even if then new point is snapped to a line feature. Any ideas on how to get this to work?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;var fibercable = FeaturesetByName($datastore, "attributeruletest.sde.fibercable", ['*'], true);&lt;BR /&gt;if(intersects(Geometry($feature), fibercable) == true)&lt;BR /&gt;{&lt;BR /&gt;return 100;&lt;BR /&gt;} else {&lt;BR /&gt;return false;&lt;BR /&gt;}&lt;/P&gt;</description>
    <pubDate>Fri, 06 Jun 2025 16:47:06 GMT</pubDate>
    <dc:creator>rsnider43</dc:creator>
    <dc:date>2025-06-06T16:47:06Z</dc:date>
    <item>
      <title>How to set a value in an attribute table when a point is put on the map and intersects a line?</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/how-to-set-a-value-in-an-attribute-table-when-a/m-p/1621589#M1778</link>
      <description>&lt;P&gt;Hello, I have written a rule that is supposed to set the value in the point attribute table to 100 if it intersects a line. I have written this script so far, but it keeps evaluating to false even if then new point is snapped to a line feature. Any ideas on how to get this to work?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;var fibercable = FeaturesetByName($datastore, "attributeruletest.sde.fibercable", ['*'], true);&lt;BR /&gt;if(intersects(Geometry($feature), fibercable) == true)&lt;BR /&gt;{&lt;BR /&gt;return 100;&lt;BR /&gt;} else {&lt;BR /&gt;return false;&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Fri, 06 Jun 2025 16:47:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/how-to-set-a-value-in-an-attribute-table-when-a/m-p/1621589#M1778</guid>
      <dc:creator>rsnider43</dc:creator>
      <dc:date>2025-06-06T16:47:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to set a value in an attribute table when a point is put on the map and intersects a line?</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/how-to-set-a-value-in-an-attribute-table-when-a/m-p/1621593#M1779</link>
      <description>&lt;P&gt;Your "Intersects" is backwards.&amp;nbsp;&lt;/P&gt;&lt;P&gt;**EDIT: Also, it returns a featureset, so you need to do a count.&amp;nbsp; updated the code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, please post code as a code sample(use javascript for arcade).&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var fibercable = FeaturesetByName($datastore,"attributeruletest.sde.fibercable", ['*'], true);
if(Count(intersects(fibercable,Geometry($feature))) &amp;gt; 0)
{
   return 100;
} else {
   return false;
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MikeMillerGIS_0-1749228834118.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/133931i004D12D1D7552EA8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MikeMillerGIS_0-1749228834118.png" alt="MikeMillerGIS_0-1749228834118.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Jun 2025 16:56:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/how-to-set-a-value-in-an-attribute-table-when-a/m-p/1621593#M1779</guid>
      <dc:creator>MikeMillerGIS</dc:creator>
      <dc:date>2025-06-06T16:56:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to set a value in an attribute table when a point is put on the map and intersects a line?</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/how-to-set-a-value-in-an-attribute-table-when-a/m-p/1621595#M1780</link>
      <description>&lt;P&gt;&lt;A href="https://developers.arcgis.com/arcade/function-reference/featureset_functions/#intersects" target="_blank"&gt;https://developers.arcgis.com/arcade/function-reference/featureset_functions/#intersects&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Jun 2025 16:55:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/how-to-set-a-value-in-an-attribute-table-when-a/m-p/1621595#M1780</guid>
      <dc:creator>MikeMillerGIS</dc:creator>
      <dc:date>2025-06-06T16:55:36Z</dc:date>
    </item>
  </channel>
</rss>

