Calculated Default Values

4504
24
04-27-2022 07:02 AM
JustinReynolds
Occasional Contributor III

We are now implementing form calculations in Field Maps on several projects and these have been a big help... some bugs to work through, but overall pretty good so far.

By design, a form calculation renders the field un-editable from within the form. This leaves me wanting a little bit as I have use cases for a calculation that fires once and only once on insert/creation but allows the field to remain editable. Call this calculated default values. Separate from a database default value of the underlying feature service and those set in feature templates which are both examples of static default values.

The classic use case is a date field (not a system date field like editor tracking)...

On insert set the date to today. e.g. return Today(); or return Now();. However, allow the field to remain editable so that a user can make a change. 90% of the time the user would need Today's date and when this event fires the user can ignore the field, but in the event that they are recording an inspection/event that occurred yesterday, today, then allow the user to manipulate the date.

By design it could be a different category of a form's field capabilities.

Currently we have

  • Calculated Expressions
  • Conditional Visibility

Can an option be added for these types of cases? Calculated Default Value Expressions?

Thanks

24 Comments
MarkEastwood

@Gavin_Leavitt Thanks for responding to the thread. 

  • I can confirm that the setup you mentioned does work in Field Maps. I was getting tripped up because I was testing the arcade calculate expression/editability constraint while editing in the New Map Viewer which doesn't support this workflow. Atleast it doesn't seem to be working on my end in the New Map Viewer, how about for you?
Gavin_Leavitt

@MarkEastwood It appears that the rules and calculations I shared do not work in the Map Viewer, as a matter of fact they block inputs into those fields entirely and prevent data submission since I have those fields set to required in the form.

Fortunately we only enter data through FM on iOS devices, but it would be nice if Esri ensured that new features actually worked across the various editing environments. 

MappyIan

Being able to edit calculated fields is the very first problem we hit when trying to implement Field Maps.  As others have said, calculated fields are correct for about 90% of the time, but sometimes you need to be able to edit the calculated value.  I really don't see why a field can't be calculated, and then editable if the value is not correct.

It would be awesome if this could be implemented.

WetherbeeDorshow

This is not just a problem with field maps, but for Experience builder as well. Many editing workflows require adjustment of default values. Without the ability to edit calculated fields, we really cannot use this option.