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
- Open the ArcGIS Pro project.
- In the Catalog pane, browse to and right-click the desired feature class, and click Manage.
- 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.
- 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.
- Right-click the feature layer in the Contents pane and click Data Design > Attribute Rules.
- Click the Add Rule drop-down and select Add Immediate Calculation Rule.
- Specify a Rule Name. For this example, ‘New Rule’ is used.
- Select the Field for the rule in the drop-down list. In this example, the 'MaintenanceDate' field is used.
- 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
- Under the Triggers column, check the Insert check box.
- 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.
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).