Form Constraint

Since version: 1.6

With the Form Constraint profile, expressions can be written to evaluate whether or not a feature meets the criteria defined in the expression. This profile is used for advanced attribute editing in Forms. The script should return a Boolean with true indicating the feature meets the constraint criteria or false indicating it does not meet the criteria.


The following products implement this profile:

Spatial reference

The spatial reference of the map in which $feature is rendered determines the spatial reference of the expression's execution context.

Profile variables

Variable NameTypeDescriptionSince version
$featureFeatureThe feature being evaluated for the constraint.1.6
$originalFeatureFeatureThe previous state of the feature.1.22
$editcontext.editTypeTextIndicates whether the edit event is INSERT, UPDATE, DELETE, or NA (not applicable).1.22
$layerFeatureSetA collection of features in the same layer as $feature.1.22
$datastoreFeatureSetCollectionA collection of layers in the same feature service or database as $feature.1.22
$featureSetFeatureSetA collection of features in the same table as $feature.1.22
$mapFeatureSetCollectionA collection of feature service layers in the same map as $feature.1.22

Function bundles

Core | Geometry | Data Access | Portal Access

Return types



Returns a Boolean value indicating if the feature has a "Completed" status and if the value of resolution is not null.

Use dark colors for code blocksCopy
$feature.status == 'Completed' && !IsEmpty($feature.resolution)

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.