Hello, in ArcGIS Survey123 Connect, I am using if() expressions in the calculation column of my XLSForm.
I would like to be able to write an expression like:
if(condition, new_value, self)
That is:
if the condition is true, a new value is calculated/written;
otherwise, the existing value in the field is preserved (a kind of self, or “current value of the field”).
At the moment, if I put the question name in the else (for example ${my_question}), this creates a dependency cycle, because the question references itself in its own calculation.
I can work around this with a hidden intermediate field that stores the original value, but this makes the form structure more complex.
My request/feature suggestion is therefore:
Add a function or keyword (for example self, current(), previous_value() or similar) that would allow, in a calculation expression, to say “keep the current value of the field” in the else case,
Without causing a cyclic dependency error, and ideally compatible with different calculationMode settings.
Does such a feature already exist in another way, or could this be considered as a possible enhancement to Survey123?