HOW TO

Generate a fixed deadline from the current day in a field using an attribute rule in ArcGIS Pro

Last Published: June 21, 2023

Summary

In ArcGIS Pro, when working in a continuous data collection project, a feature layer can be configured to generate fixed deadlines based on the current date. This is crucial to ensure difficult projects remain on schedule and completed by a particular deadline.

This article describes the workflow to generate a fixed deadline from the current day in a field using an attribute rule in ArcGIS Pro.

Procedure

  1. Open the ArcGIS Pro project.
  2. In the Catalog pane, browse to and right-click the desired feature class, and click Manage.
  3. In the Feature Class Properties window, in the Manage section, check the Global IDs check box. Click OK at the bottom right corner of the window.
Enable Global IDs for the feature class
  1. Add a new date field on the feature layer. In this example, 'MaintenanceDate' is used to represent the deadline field. Refer to ArcGIS Pro: Add Field (Data Management) for more information.
  2. Right-click the feature layer in the Contents pane and click Data Design > Attribute Rules.
  3. Click the Add Rule drop-down and select Add Immediate Calculation Rule.
  4. Specify a Rule Name. For this example, ‘New Rule’ is used.
  5. Select the Field for the rule in the drop-down list. In this example, the 'MaintenanceDate' field is used.
  6. In the Expression box, type the following Arcade expression. Replace '<numberOfDays>' with a desired number to represent the duration before the deadline. In this example, 10 days is specified.
var maintenance_date = Now()
var expire_date = DateAdd(maintenance_date, <numberOfDays>, "days")
return expire_date
Attribute rule expression text box
  1. Under the Triggers column, check the Insert check box.
  2. On the Attribute Rules tab, in the Attribute Rules group, click Save.

The image below shows a fixed deadline is generated from the current day in a field using an attribute rule in ArcGIS Pro. In this example, the current date is 5/18/2023 with the deadline set to be on 5/28/2023.

The deadline is set for 10 days from the current day
Note: 
Use the Convert Time Zone (Data Management) tool to convert the time values to another time zone. By default, the value is set to coordinated universal time (UTC).

Article ID: 000030596

Software:
  • ArcGIS Pro 3 1
  • ArcGIS Pro 3 0
  • ArcGIS Pro 2 8 x

Receive notifications and find solutions for new or common issues

Get summarized answers and video solutions from our new AI chatbot.

Download the Esri Support App

Related Information

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options