Select to view content in your preferred language

ArcGIS Map form with calculated fields asks to be saved even if no edits made

429
2
10-06-2024 09:53 PM
Labels (1)
KeithSalmon
Occasional Contributor

Sometimes after saving a feature layer record such as in the Weeds Map in the Experience Builder screenshot below, when you click to return from the edit screen, a warning occurs:

 "Discard edits   Unsaved changes will be lost." 

even though no changes have been made.

KeithSalmon_0-1728276762968.png

All is well if you click on the red "Discard changes" button.

But if you click Continue editing, it returns to the edit screen. 

So you have to exit the Edit screen again and click on  the red "Discard changes" button.

This doesn’t make for an easy UX for new users.

An expert has suggested to us that the Arcade calculations just keep in retrying and this causes the Edit screen to believe that the new values calculated need to be changed.

We’d be grateful for any recommendations about how to overcome this problem without losing the Arcade expressions in the form.

Link to our report: ArcGIS Map form with calculated fields asks to be saved even if no edits made

0 Kudos
2 Replies
AlixVezina
Esri Regular Contributor

@KeithSalmon 

What kind of calculations do you have in the form? This may be something to do with the edit context of your calculations. Calculated expression may be recalculated every time the form is loaded. Use the $editcontext.editType variable to indicate whether the calculated expressions should be executed when the feature is created, updated, or deleted.

Some examples here: Go Beyond the Smart Editor using Smart Forms (esri.com)

AlixVezina_0-1728322033190.png

 

0 Kudos
KeithSalmon
Occasional Contributor

Thanks very much - I will look into this. But I think the Arcade needs to run for both inserts and edits.

0 Kudos