Hi,
I was wondering if anyone knows how to set fields to be either mandatory or optional in an ArcGIS feature class? The only thing I can find any information on, are the required fields (e.g. Object Id, Shape) that are automatically generated upon the creation of a feature class.
I have a data set that has data quality issues, and I want to ensure that when someone adds a point/row to the dataset, the important fields are filled (i.e. I want to make 5 or 6 fields mandatory to enter a value), and make the other fields optional to fill out.
Any help would be much appreciated.
Thanks,
C
Creating a required field in ArcGIS
Started by
ClareS2S
, Oct 18 2012 02:29 PM
2 replies to this topic
#1
Posted 18 October 2012 - 02:29 PM
#2
Posted 19 October 2012 - 01:49 AM
Isn't this stuff you can do if you use a data model with topology with a geodatabase?
#3
Posted 20 October 2012 - 03:46 PM
You can specify whether or not fields are required through the Add Field (Data Management) tool. Select the "Field is Required (optional)" check box through the tool itself or add it to an arcpy script:
Example from ESRI
Example from ESRI
import arcpy
from arcpy import env
env.workspace = "C:/data/airport.gdb"
arcpy.AddField_management("schools", "ref_ID", "LONG", 9, "", "", "refcode", "NULLABLE", "REQUIRED")Specifies whether the field being created is a required field for the table; only supported for fields in a geodatabase.
- NON_REQUIRED —The field is not a required field. This is the default.
- REQUIRED —The field is a required field. This means new records must contain a value for the field. Required fields are permanent and can not be deleted.
Edited by AaronP, 20 October 2012 - 03:50 PM.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users


Sign In
Create Account
Canada
Back to top
Sweden
United States








