<?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: Wanting to assign IDS to Asssets automatically in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/wanting-to-assign-ids-to-asssets-automatically/m-p/1485634#M84216</link>
    <description>&lt;P&gt;Most definitely! Here is an example of something similar I set up:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;// Make the parcels layer available
var parks = FeatureSetByName($datastore, "epgdb.PARKS.Parks",['PARKNAME']);
 
// Determine if a newly created point falls within the boundary of any parcels
var inter = Intersects($Feature, parks);
 
// Identify the first parcel that the point falls within. This is necessary because some of our parcels are stacked on top of each other, but we only want to access a single PID
var inPark = first(inter);
 
// If the point falls within a parcel, write that parcel's PID into the new point's attribute. Otherwise, the attribute value remains &amp;lt;Null&amp;gt;
if (!IsEmpty(inPark)){
return proper(inPark.PARKNAME)
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Basically, when a new tree gets created, this Attribute Rule code will&lt;/P&gt;&lt;P&gt;Step1: search our geodatabase for the feature class "Parks"&lt;/P&gt;&lt;P&gt;Step2 and 3: do a spatial intersect and get the park the tree falls within,&lt;/P&gt;&lt;P&gt;Step 4: return the park name.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can sub in any variable you need to in that return, plus if you need any other text elements, incrementing numbers, etc.&lt;/P&gt;</description>
    <pubDate>Wed, 05 Jun 2024 19:24:56 GMT</pubDate>
    <dc:creator>ZachBodenner</dc:creator>
    <dc:date>2024-06-05T19:24:56Z</dc:date>
    <item>
      <title>Wanting to assign IDS to Asssets automatically</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/wanting-to-assign-ids-to-asssets-automatically/m-p/1485611#M84214</link>
      <description>&lt;P&gt;&lt;SPAN&gt;We have an emergency GRID that is comprised of&amp;nbsp; 250&amp;nbsp; squares each with its labeling feature and naming ID.&amp;nbsp; we have some Assets that fall within each grid and we would like to generate or make a script that would automatically recognize which grid square it is in and assign it an ID number.&amp;nbsp; Is there something like this that anyone knows of that we can use or plug and play?&amp;nbsp; &amp;nbsp;Or is there a specific tool that we can use in Pro that does it? Thank you.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jun 2024 19:01:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/wanting-to-assign-ids-to-asssets-automatically/m-p/1485611#M84214</guid>
      <dc:creator>DevarsiMajumder</dc:creator>
      <dc:date>2024-06-05T19:01:02Z</dc:date>
    </item>
    <item>
      <title>Re: Wanting to assign IDS to Asssets automatically</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/wanting-to-assign-ids-to-asssets-automatically/m-p/1485634#M84216</link>
      <description>&lt;P&gt;Most definitely! Here is an example of something similar I set up:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;// Make the parcels layer available
var parks = FeatureSetByName($datastore, "epgdb.PARKS.Parks",['PARKNAME']);
 
// Determine if a newly created point falls within the boundary of any parcels
var inter = Intersects($Feature, parks);
 
// Identify the first parcel that the point falls within. This is necessary because some of our parcels are stacked on top of each other, but we only want to access a single PID
var inPark = first(inter);
 
// If the point falls within a parcel, write that parcel's PID into the new point's attribute. Otherwise, the attribute value remains &amp;lt;Null&amp;gt;
if (!IsEmpty(inPark)){
return proper(inPark.PARKNAME)
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Basically, when a new tree gets created, this Attribute Rule code will&lt;/P&gt;&lt;P&gt;Step1: search our geodatabase for the feature class "Parks"&lt;/P&gt;&lt;P&gt;Step2 and 3: do a spatial intersect and get the park the tree falls within,&lt;/P&gt;&lt;P&gt;Step 4: return the park name.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can sub in any variable you need to in that return, plus if you need any other text elements, incrementing numbers, etc.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jun 2024 19:24:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/wanting-to-assign-ids-to-asssets-automatically/m-p/1485634#M84216</guid>
      <dc:creator>ZachBodenner</dc:creator>
      <dc:date>2024-06-05T19:24:56Z</dc:date>
    </item>
  </channel>
</rss>

