What is up with the Update Button (Calculate Button) on an edit?

02-18-2021 11:32 AM
New Contributor II

I noticed during an edit of a feature in Survey123, i need to click the update button for fields i have a calculation for.

I have the button highlighted in Picture below.



Here is my Calculation:

if(${site_id} > 0,'2', '1')


When creating a new site, the calculation runs automatically, but during an edit, the user needs to click on the button to run the calculation.


This is a kinda lame feature.


How do i get past it? I just want edited records to have the same behavior as new records in the Survey123 form.


0 Kudos
1 Reply
Esri Frequent Contributor

Hi @ScottLehto1 

When you are creating a new survey, calculations trigger automatically whenever a question has never been manually changed by the end user. When a user manually enters a value in a calculated question, the calculation stops executing because otherwise the calculation could overwrite the calculated value.

For the convenience of the end user, the calculation refresh button appears on the side in case the user decides to trigger the calculation again.   That is the meaning of the button you see.

When a record is loaded from the Inbox, there is no way for the Survey123 app to know if a value in a question comes from user input or from a calculation. For this reason, the behavior is not to trigger calculations to avoid data loss. The refresh calculation button is shown, again, in case the end user decides to trigger the calculation for a particular question.

At this moment, there is no way in XLSForm to indicate that a question calculation should be triggered always even if the record comes from the Inbox or the end-user has manually entered a value. 



0 Kudos