Use Arcade Expression to Specify Default Value

3 weeks ago
Status: Open
Labels (1)
New Contributor III

When creating a field, you're limited to specifying a static value as the default value.  You can use Attribute Rules to change a value dynamically using Arcade Expressions, but the value can change depending on how the expression is configured.

If you set the value in the Attribute Rule when the feature is created, you can only change it after the feature is saved if you don't enable the attribute rule to run on feature updates.

It would be nice if you could use Arcade Expressions to set the default value but allow the user to change the value after it's been generated by the expression, without having to save first.  Let it suggest a value, but allow the user to enter a different value if they choose.

For example, I have a feature with a field for Start Date.  By default, I'd like it to enter the current date, but that wouldn't be the case every time.  The Start Date could be in the future, or it could have already started and the user is entering it after the fact.

Tags (2)
1 Comment

If you're just looking to set a default date of today this article might help How To: Specify the current date as the default value for a Date field when creating new features in....

How is this request different than setting the attribute rule to run on insert and then changing the date attribute later? Just trying to understand how this implementation adds value.