<?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 Retain FacilityID Value when Creating Records if Not Null in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/retain-facilityid-value-when-creating-records-if/m-p/1315301#M71723</link>
    <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;I am trying to update my attribute rule for calculating object FacilityIDs to retain existing values of FacilityID when appending data rather than creating a new one each time. Any help would be much appreciated. I have tried using the IsEmpty function with no avail.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;//Assign initial FacilityID value to variable FID
var IdSeq = NextSequenceValue("esSeq1")
var FID = "ES_" + text(Date(), "MMDDYYYY_") + IdSeq;

//Test first sequence value
if(IdSeq&amp;lt;=100010){
   return FID} 
else {IdSeq = NextSequenceValue("esSeq2");
      FID = "ES_" + text(Date(), "MMDDYYYY_") + IdSeq};

//Test second sequence value if necessary
if(IdSeq&amp;lt;=100010){
    return FID}
else {FID = "Update Attribute Rule";
return FID};&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 04 Aug 2023 14:59:43 GMT</pubDate>
    <dc:creator>drWood</dc:creator>
    <dc:date>2023-08-04T14:59:43Z</dc:date>
    <item>
      <title>Retain FacilityID Value when Creating Records if Not Null</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/retain-facilityid-value-when-creating-records-if/m-p/1315301#M71723</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;I am trying to update my attribute rule for calculating object FacilityIDs to retain existing values of FacilityID when appending data rather than creating a new one each time. Any help would be much appreciated. I have tried using the IsEmpty function with no avail.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;//Assign initial FacilityID value to variable FID
var IdSeq = NextSequenceValue("esSeq1")
var FID = "ES_" + text(Date(), "MMDDYYYY_") + IdSeq;

//Test first sequence value
if(IdSeq&amp;lt;=100010){
   return FID} 
else {IdSeq = NextSequenceValue("esSeq2");
      FID = "ES_" + text(Date(), "MMDDYYYY_") + IdSeq};

//Test second sequence value if necessary
if(IdSeq&amp;lt;=100010){
    return FID}
else {FID = "Update Attribute Rule";
return FID};&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Aug 2023 14:59:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/retain-facilityid-value-when-creating-records-if/m-p/1315301#M71723</guid>
      <dc:creator>drWood</dc:creator>
      <dc:date>2023-08-04T14:59:43Z</dc:date>
    </item>
    <item>
      <title>Re: Retain FacilityID Value when Creating Records if Not Null</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/retain-facilityid-value-when-creating-records-if/m-p/1316205#M71834</link>
      <description>&lt;P&gt;Did you try Not is empty (!IsEmpty)?&lt;/P&gt;&lt;P&gt;The following will return the existing FacilityID if it exists, if not, moves on to the else block (assuming the FID field is named 'FacilityID').&lt;/P&gt;&lt;LI-CODE lang="c"&gt;if (!IsEmpty($feature.FacilityID)){
  return $feature.FacilityID
}
else{
  // get and assign new sequence here
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;R_&lt;/P&gt;</description>
      <pubDate>Mon, 07 Aug 2023 20:55:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/retain-facilityid-value-when-creating-records-if/m-p/1316205#M71834</guid>
      <dc:creator>RichlandGIS</dc:creator>
      <dc:date>2023-08-07T20:55:03Z</dc:date>
    </item>
  </channel>
</rss>

