Welcome @elafritz
If you use calculation, this is always (re-)done on save and open.
- You may combine it with once(…) to only set it if the field is empty.
- And you may try with a default:
“which will only be calculated only once when the form loads or - if the question is inside a repeat when the repeat is added.” (xlsform.org)