I am just wondering if Attribute Validation is better with Database Trigger or Arcade.
Suppose I want to do Attribute Validation about the value of one coloumn that depends on the value of another coloumn OR maybe I want to limit the data entry of a coloumn OR maybe I want to populate a date coloumn automatically.
In a scenario in which the data (stored in SDE) have to be accessed by many people via Map / Feature Service, which one is more suitable in term of fastness and reliability ? What are the considerations in choosing a particular method ?
Thank you
Hi @RobertKrisher The database is run locally, not in the cloud. I am planning to move the Arcgis Server out of AWS next year. So this will make both of them rum locally.
FYI, I found that the attribute rule (Constraint) in gdb_items. This is the query :
select definition from sde.gdb_items where physicalname = 'DB.SCHEMA.TABLE_NAME'.
So, does this mean that the Constraint run on the Server Side ? How do you differentiate between attribute rules that run on the Client Side vs Server Side ?
Additional:
I found 2 good readings : Atributes Rules Tips and Best Practices and Pros Cons Attribute Rules vs Trigger
Yes, the constraint rules can run for both client and server side. As perhaps mentioned before, client side simply means using the devices resources to check for edits whereas server side typically checks tables where attributes reference other tables.
For instance,
// Constraint type on client side
var dt = $feature.date
iif( IsEmpty( dt ), { 'errorMesssage':'Please update the date field'}, True)
// Constraint type on server side
var FieldMapAtt = $feature.SomeValue
var RelVal = Filter( FeatureSetByName($datastore,"Feature Name",['Field'],False), "FieldName = 'SomeValue'" )
iif( TypeOf( RelVal ) != 'Feature', False, True )Hope this gives some idea on how this will work for you.