<?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 Script Not working in ArcGIS Pro 3.2 in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-script-not-working-in-arcgis-pro-3-2/m-p/1364526#M76758</link>
    <description>&lt;P&gt;No known issues in 3.2, all scripts should just work.&lt;/P&gt;&lt;P&gt;Looking at the code I see you are using a variable &lt;SPAN&gt;LBCode&amp;nbsp;where it is not defined, this might be a bug in 3.1 that we fixed in 3.2 (we start detecting undefined variables), you might have meant to use&amp;nbsp;attributeValue&amp;nbsp; instead.&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would suggest for performance avoiding using the count here and just do&amp;nbsp; first and check for null and only ask for you are using. here is the rewritten script with the LBCode fixed.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var intersectLayer = FeatureSetByName($datastore, "Lsgd_Boundary", ['LBCode'], false);
var attributeName = 'LBCode';

var intersectingFeatures = Intersects(intersectLayer, $feature);
var intersectedFeature = First(intersectingFeatures);
if (intersectedFeature == null) return 'NA'; 

var attributeValue = intersectedFeature[attributeName];

// Generate a unique sequence number
var id = NextSequenceValue("uniqueid");

// Concatenate LBCode and the unique sequence number
var projectID = attributeValue  + "-" + id;

return projectID;
 &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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 27 Dec 2023 16:38:29 GMT</pubDate>
    <dc:creator>HusseinNasser2</dc:creator>
    <dc:date>2023-12-27T16:38:29Z</dc:date>
    <item>
      <title>Arcade Script Not working in ArcGIS Pro 3.2</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-script-not-working-in-arcgis-pro-3-2/m-p/1364300#M76721</link>
      <description>&lt;P&gt;Arcade script which working good with ArcGIS Pro 3.1 is not working with ArcGIS Pro 3.2. Is it a known Bug?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/346994"&gt;@HusseinNasser2&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Dec 2023 13:23:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-script-not-working-in-arcgis-pro-3-2/m-p/1364300#M76721</guid>
      <dc:creator>HarishKV</dc:creator>
      <dc:date>2023-12-26T13:23:37Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Script Not working in ArcGIS Pro 3.2</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-script-not-working-in-arcgis-pro-3-2/m-p/1364301#M76722</link>
      <description>&lt;P&gt;Including the script in your question would be useful.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Dec 2023 13:45:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-script-not-working-in-arcgis-pro-3-2/m-p/1364301#M76722</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2023-12-26T13:45:49Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Script Not working in ArcGIS Pro 3.2</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-script-not-working-in-arcgis-pro-3-2/m-p/1364415#M76735</link>
      <description>&lt;P&gt;I dont think its retired. Cant find any traces of it in release note.&lt;/P&gt;&lt;P&gt;anyways adding code for reference&lt;/P&gt;&lt;P&gt;var intersectLayer = FeatureSetByName($datastore, "Lsgd_Boundary");&lt;BR /&gt;var attributeName = 'LBCode';&lt;/P&gt;&lt;P&gt;var intersectingFeatures = Intersects(intersectLayer, $feature);&lt;/P&gt;&lt;P&gt;if (Count(intersectingFeatures) &amp;gt; 0) {&lt;BR /&gt;var intersectedFeature = First(intersectingFeatures);&lt;BR /&gt;var attributeValue = intersectedFeature[attributeName];&lt;BR /&gt;&lt;BR /&gt;// Generate a unique sequence number&lt;BR /&gt;var id = NextSequenceValue("uniqueid");&lt;BR /&gt;&lt;BR /&gt;// Concatenate LBCode and the unique sequence number&lt;BR /&gt;var projectID = LBCode + "-" + id;&lt;BR /&gt;&lt;BR /&gt;return projectID;&lt;BR /&gt;} else {&lt;BR /&gt;return 'NA';&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Wed, 27 Dec 2023 03:45:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-script-not-working-in-arcgis-pro-3-2/m-p/1364415#M76735</guid>
      <dc:creator>HarishKV</dc:creator>
      <dc:date>2023-12-27T03:45:14Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Script Not working in ArcGIS Pro 3.2</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-script-not-working-in-arcgis-pro-3-2/m-p/1364526#M76758</link>
      <description>&lt;P&gt;No known issues in 3.2, all scripts should just work.&lt;/P&gt;&lt;P&gt;Looking at the code I see you are using a variable &lt;SPAN&gt;LBCode&amp;nbsp;where it is not defined, this might be a bug in 3.1 that we fixed in 3.2 (we start detecting undefined variables), you might have meant to use&amp;nbsp;attributeValue&amp;nbsp; instead.&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would suggest for performance avoiding using the count here and just do&amp;nbsp; first and check for null and only ask for you are using. here is the rewritten script with the LBCode fixed.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var intersectLayer = FeatureSetByName($datastore, "Lsgd_Boundary", ['LBCode'], false);
var attributeName = 'LBCode';

var intersectingFeatures = Intersects(intersectLayer, $feature);
var intersectedFeature = First(intersectingFeatures);
if (intersectedFeature == null) return 'NA'; 

var attributeValue = intersectedFeature[attributeName];

// Generate a unique sequence number
var id = NextSequenceValue("uniqueid");

// Concatenate LBCode and the unique sequence number
var projectID = attributeValue  + "-" + id;

return projectID;
 &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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Dec 2023 16:38:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-script-not-working-in-arcgis-pro-3-2/m-p/1364526#M76758</guid>
      <dc:creator>HusseinNasser2</dc:creator>
      <dc:date>2023-12-27T16:38:29Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Script Not working in ArcGIS Pro 3.2</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-script-not-working-in-arcgis-pro-3-2/m-p/1364685#M76787</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/346994"&gt;@HusseinNasser2&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That works. Thank for support.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Dec 2023 04:17:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-script-not-working-in-arcgis-pro-3-2/m-p/1364685#M76787</guid>
      <dc:creator>HarishKV</dc:creator>
      <dc:date>2023-12-28T04:17:07Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Script Not working in ArcGIS Pro 3.2</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-script-not-working-in-arcgis-pro-3-2/m-p/1366916#M77017</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/346994"&gt;@HusseinNasser2&lt;/a&gt;&amp;nbsp;some of these codes when i am publishing data is having a problem in execution. Sometimes giving NULL value&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jan 2024 18:38:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-script-not-working-in-arcgis-pro-3-2/m-p/1366916#M77017</guid>
      <dc:creator>HarishKV</dc:creator>
      <dc:date>2024-01-05T18:38:09Z</dc:date>
    </item>
  </channel>
</rss>

