Select to view content in your preferred language

Overwriting time question when cycling through repeats

240
7
4 weeks ago
GeorgeClutterbuck
New Contributor III

Using survey123 connect I have created form containing repeats which contain a time field. If I cycle through the repeats once filled out, the time field for all the repeats change to the most recent entry. I've tried using the once( function and changing the bind parameters to manual calculation and this works fine before publishing the survey on desktop, but the error perists on the field app and post submission. Any thoughts?

Thanks.

0 Kudos
7 Replies
PanGIS
by
Regular Contributor

I am struggling on the same, finger crossed I managed.

I would say that depends on the type of calculation, one solution does not fit all.

Have you tried to use "calculationMode=whenEmpty"

0 Kudos
GeorgeClutterbuck
New Contributor III

yeah tried that, looked fine on the desktop but then wrong on the field app, frustrating.

0 Kudos
DougBrowning
MVP Esteemed Contributor

Wrap it in once() works well for me

0 Kudos
GeorgeClutterbuck
New Contributor III

did you just do once(now()) for the calculation and it was fine? or did you set the parameters field to manual also? I saw your previous response to a similar post.

0 Kudos
DougBrowning
MVP Esteemed Contributor

I have been using just once(now()) for years before the calculation modes were added.  So far been ok.

0 Kudos
abureaux
MVP Regular Contributor

I literally just had this come up after no issues. Will be trying once() myself (as @DougBrowning suggested).

RobertAnderson3
MVP Regular Contributor

once() is definitely a good solution, I've been liking calculationMode=whenEmpty for calculations as well.

If you're just looking for it to capture now(), could you put it in the default column instead of the calculation column?