<?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: Attribute Rule to calculate date 10 days from collection date in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/attribute-rule-to-calculate-date-10-days-from/m-p/1270747#M67069</link>
    <description>&lt;LI-CODE lang="javascript"&gt;// Calculation Attribute Rule on the maintenance table
// field: ExpireDate
// triggers: insert

var maintenance_date = $feature.MaintenanceDate
if(maintenance_date == null) {
    // if there is no date value in the field, you have two options:
    // return null (no expire date)
    // use the current date

//    return null  // uncomment this line to return null
    maintenance_date = Today()
}
var expire_date = DateAdd(maintenance_date, 10, "days")
return expire_date&lt;/LI-CODE&gt;</description>
    <pubDate>Thu, 23 Mar 2023 06:53:46 GMT</pubDate>
    <dc:creator>JohannesLindner</dc:creator>
    <dc:date>2023-03-23T06:53:46Z</dc:date>
    <item>
      <title>Attribute Rule to calculate date 10 days from collection date</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/attribute-rule-to-calculate-date-10-days-from/m-p/1270609#M67048</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Curious at how I would go about this scenario:&lt;/P&gt;&lt;P&gt;A parent feature class (tanks) with child table (maintenance). Say we shock one of the tanks and record that date in table, we want to populate another field in table of when this "shocking" expires eg. 10 days from now.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've seen that it is possible in other scenarios like pop-ups and dashboards but haven't found any relavant information on doing this as an attribute rule that can be published in Portal and taken offline for the data collection.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Mar 2023 20:19:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/attribute-rule-to-calculate-date-10-days-from/m-p/1270609#M67048</guid>
      <dc:creator>KatiePiper</dc:creator>
      <dc:date>2023-03-22T20:19:10Z</dc:date>
    </item>
    <item>
      <title>Re: Attribute Rule to calculate date 10 days from collection date</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/attribute-rule-to-calculate-date-10-days-from/m-p/1270747#M67069</link>
      <description>&lt;LI-CODE lang="javascript"&gt;// Calculation Attribute Rule on the maintenance table
// field: ExpireDate
// triggers: insert

var maintenance_date = $feature.MaintenanceDate
if(maintenance_date == null) {
    // if there is no date value in the field, you have two options:
    // return null (no expire date)
    // use the current date

//    return null  // uncomment this line to return null
    maintenance_date = Today()
}
var expire_date = DateAdd(maintenance_date, 10, "days")
return expire_date&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 23 Mar 2023 06:53:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/attribute-rule-to-calculate-date-10-days-from/m-p/1270747#M67069</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2023-03-23T06:53:46Z</dc:date>
    </item>
  </channel>
</rss>

