常见问题

常见问题解答:重置 ArcGIS Server 要素服务的必填字段

Last Published: September 14, 2023

答案

As an administrator, it may be necessary to ensure values are entered by field users in a specific field. Within the geodatabase information model, you can define a field as non-nullable and a value must be supplied for that attribute before it can be submitted. In Collector for ArcGIS, this may not be enforced when creating a new feature. See the Collector for ArcGIS blog: Require the information you need from the field

Esri has provided a workaround for Hosted Feature services on Github, however this is not applicable for ArcGIS Server services.  For ArcGIS Server services, it is necessary to add a property to the Feature Service via the Server Admin directory at REST, as follows. 

  1. Go into the server’s admin REST page – for example: 
https://myserver.esri.com:6443/arcgis/admin/login
  1. Log in as the admin.
  2. Go to the services page, for example:
 https://relic.esri.com:6443/arcgis/admin/services
  1. Click the service that they are using, for example:
 https://relic.esri.com:6443/arcgis/admin/services/emptygeom.MapServer
  1. Scroll to the bottom of the page and click Edit.
  2. Go to the feature service section and at the bottom add the following:
"setDefaultsToNullForNotNullFieldsInTemplates":"true"
  1. Click Save.
  2. Reset the service.

文章 ID:000022706

从 ArcGIS 专家处获得帮助

联系技术支持部门

下载 Esri 支持应用程序

转至下载选项

相关信息

发现关于本主题的更多内容