<?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: Arcade Calculation Rule with if statement to determine intersecting feature set to use in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-calculation-rule-with-if-statement-to/m-p/1379037#M78415</link>
    <description>&lt;P&gt;Dear Adam,&lt;/P&gt;&lt;P&gt;If you can share a portion of your gdb with feature classes which you used in this script it will be easier to debug the code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;best regards&lt;/P&gt;</description>
    <pubDate>Wed, 07 Feb 2024 12:21:11 GMT</pubDate>
    <dc:creator>Amir-Sarrafzadeh-Arasi</dc:creator>
    <dc:date>2024-02-07T12:21:11Z</dc:date>
    <item>
      <title>Arcade Calculation Rule with if statement to determine intersecting feature set to use</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-calculation-rule-with-if-statement-to/m-p/1378915#M78408</link>
      <description>&lt;P&gt;Hello I am attempting to create a Calculation Rule that will use the endpoint of a given line feature, iterate through a list of possible feature layers with intersections and then based on the results of the if statement obtain a value from the intersecting feature and update the line feature with this attribute. It doesnt error out but it also doesnt update the value as needed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var intersecting_field = "stationID";
var LineEndPoint = Geometry($feature).paths[-1][-1];
var FPFilter = Filter(FeatureSetByName($datastore,'SP'),'Subtype = 16');
var HHFilter = Filter(FeatureSetByName($datastore,'PA'),"Subtype = 5");
var PFilter = Filter(FeatureSetByName($datastore,'SS'),'Subtype &amp;lt;&amp;gt; 6 OR Subtype IS NULL');
var SPFilter = Filter(FeatureSetByName($datastore,'SP'),'Subtype IN (16,0,1,20)');
var PAFilter = Filter(FeatureSetByName($datastore,'PA'),'Subtype IN (0,2,3,4,6)');
intersectionLayer = ''
if (Intersects(LineEndPoint, FPFilter)==true){
    intersectionLayer = FPFilter;}
if (Intersects(LineEndPoint, HHFilter)==true){
    intersectionLayer = HHFilter;}
if (Intersects(LineEndPoint, PFilter)==true){
    intersectionLayer = PFilter;}
if (Intersects(LineEndPoint, SPFilter)==true){
    intersectionLayer = SPFilter;}
if (Intersects(LineEndPoint, PAFilter)==true){
    intersectionLayer = PAFilter;}
return intersectionLayer
if (IsEmpty(intersected_feature) || intersected_feature == null)
{ 
    return;
}
// If the intersected feature is null, return the original value
if (IsEmpty(intersected_feature.stationID))
{
    return;
}
return {
    //result is a dictionary
    "result": {
        "attributes": {
            "stationID": intersected_feature[intersecting_field]
        }
    }
};&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Feb 2024 23:11:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-calculation-rule-with-if-statement-to/m-p/1378915#M78408</guid>
      <dc:creator>AdamBarrs</dc:creator>
      <dc:date>2024-02-06T23:11:27Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Calculation Rule with if statement to determine intersecting feature set to use</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-calculation-rule-with-if-statement-to/m-p/1379037#M78415</link>
      <description>&lt;P&gt;Dear Adam,&lt;/P&gt;&lt;P&gt;If you can share a portion of your gdb with feature classes which you used in this script it will be easier to debug the code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;best regards&lt;/P&gt;</description>
      <pubDate>Wed, 07 Feb 2024 12:21:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-calculation-rule-with-if-statement-to/m-p/1379037#M78415</guid>
      <dc:creator>Amir-Sarrafzadeh-Arasi</dc:creator>
      <dc:date>2024-02-07T12:21:11Z</dc:date>
    </item>
  </channel>
</rss>

