Unique attribute indexes in file geodatabases

365
1
01-22-2024 01:12 PM
Status: Open
Labels (1)
Bud
by
Esteemed Contributor

As far as I can tell, unique attribute indexes are not supported in file geodatabases.

It would help to have that functionality so that I could enforce uniqueness in a user-defined field, such as ASSET_ID (text).

1 Comment
JoshuaBixby

I am guessing one of Esri's responses, assuming they do respond, will be that uniqueness can be enforced through an Attribute Rule.  I find Attribute Rules clunky, but they are portable across a range of Esri products:

var val = $feature.FieldName;
var cnt = Count(Filter($featureset, 'FieldName = @VaL'));
Boolean(cnt < 2);