How To: Auto-populate a date/time field in ArcPad with automatically created data
When using ArcPad, adding a date/time stamp in the attribute table of data can provide valuable information. This information can be collected without custom scripting. The instructions provided describe how to auto-populate a date/time field in ArcPad with automatically created data.
Obtaining the automatically created date/time information from ArcPad.
- In ArcMap, check out the layer to AXF.
For more information about checking out layers, see ArcGIS Resource Center: Get Data for ArcPad – 'The Check Out Process'.
- Before going to ArcPad and while still in ArcMap, open the attribute table of the feature class.
- Add a new Date field and name it 'AXF_TIMESTAMP'.
Add Field dialog box
The 'AXF_TIMESTAMP' field cannot be present when checking out to ArcPad because ArcPad will not execute if this field is present.
- Go to ArcPad and open the AXF created in Step 1.
- Start editing and add a feature. (There is no need to fill out any field values in the Edit Form unless required.)
- Check the AXF back into ArcMap and open the attribute table of the feature class.
For more information about checking in layers, see ArcGIS Resource Center: Get Data from ArcPad – 'The Check In Process'.
Notice the 'AXF_TIMESTAMP' field created after the checkout is automatically populated with date and time values.
Auto-populated Date/Time Field
If a workflow requires that a layer be checked in and out multiple times, a few more steps are required because the 'AXF_TIMESTAMP' field cannot be present when checking back out to ArcPad. Steps 7-13 describe the the workflow required if the data will be checked out multiple times from a feature class.
- After checking in the data and viewing the auto-populated date and time information in the attribute table, create a new text field and name it 'DateCopy'.
- Perform a field calculation on the new field to copy the data from 'AXF_TIMESTAMP' into 'DateCopy'.
- Delete the 'AXF_TIMESTAMP' field and check out the data again.
- Re-create the 'AXF_TIMESTAMP' field in ArcMap, which is now empty.
- After making edits in the field, check the data back into ArcMap and open the attribute table of the feature class.
Notice that only the newly created features have date and time information in their cells.
- Select all records that have date and time values in the 'AXF_TIMESTAMP' field and perform a field calculation on the 'DateCopy' field to copy the values from 'AXF_TIMESTAMP' again.
Copy values from AXF_TIMESTAMP to DateCopy
- Before checking this feature class back out for field editing again, repeat steps 3-7.