Calculate once

Hi all,

I remember that I saw at one point a post about it, but I can not find it anymore.
How to have a calculated field with the calculation only done one time.

My example:

I answer to some questions (my variables) and at one point I calculate a value based on the values entered.
This calculation should occur only once.
This mean that if at one point I go back and modify the answers the calculated value should not change, and remain with the first calculated value.

Is this something possible or only a dream? :slight_smile:

1 Like

Dreams do come true, @aurdipas!! :tada:

https://docs.opendatakit.org/form-operators-functions#once is the function reference. I also recommend reading https://docs.opendatakit.org/form-logic/#when-expressions-are-evaluated which provides some more context on how expressions are evaluated in a form.

3 Likes

superheroi-criacao-menino-02

1 Like