Select to view content in your preferred language

Allow Editing on Fields with Arcade Calculated Expressions

4314
32
08-22-2023 04:25 PM
Status: Open
Labels (2)
JoshuaFlickinger
Occasional Contributor

Idea

Allow fields to remain editable when an Arcade Expression is used to calculate them.

Reasoning

Calculated expressions are great at improving efficiency in field operations, but in advanced use cases they don't always work the way I expect them to.  Some of it may be user error on my part, but because I can't rely on my expressions, I generally end up not using them.  Allowing the field to remain editable would increase usability in the shoulder cases where my expressions fail to return expected results.

Example

I provide GIS support for a forest monitoring crew.  The crew maps trees in plots and fills out a bunch of information about each tree.  To keep track of trees over time, each tree gets a unique identifier.  I wrote an Arcade expression to create the tree ID on the fly whenever a new tree is mapped.  The expression uses a geometry intersect to determine which plot the tree is in.  Then it counts all the existing trees in that plot and adds 1 to the number of existing trees.  Finally it returns the plot and tree number in a nicely configured format. 

Works like a charm, when it works.  Unfortunately, it doesn't work when the accuracy threshold for data collection hasn't been met.  In these cases, no point exists to do the geometry intersect, but arcade still proceeds with the calculation.  It looks like it errantly picks the first plot in the list by default and returns me a blatantly wrong ID.  Would be great if I could go back in and manually input the ID in these cases.

32 Comments
DaveGregovich1

I just ran into this issue as a beginner. I want to calculate a field, populating the field from the previous record. Except for the first record, which I want the user to manually populate. 

So the situation is very similar to other users, calculate the field, but be able to manually intervene in specific instances.

BClaridge

The toggle work around functions in Map Viewer, but in Field Maps on a device- the feature with the arcade expressions and the editable expression has this error: 

I've updated the App, checked the default is set for the new Toggle field, etc.  Any ideas?

BClaridge_0-1724774915536.png