Jump to content


Creating a required field in ArcGIS

- - - - -

  • Please log in to reply
2 replies to this topic




  • New Member
  • Pip
  • 1 posts
  • Canada


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.




    Hall of Fame

  • Admin
  • PipPipPipPipPipPipPip
  • 2,372 posts
  • Gender:Male
  • Location:Stockholm, Sweden
  • Interests:music, hiking, friends, nature, photography, traveling. and maps!
  • Sweden

Isn't this stuff you can do if you use a data model with topology with a geodatabase?
Hugo Ahlenius
Nordpil - custom maps and GIS




  • Validated Member
  • Pip
  • 9 posts
  • United States

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

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