Change of dates during submission of form after editing

Dear All,
I am facing an issue, that we have field workers who do the patient interviews and collect data in the kobo app. Some information such as follow-up or results are pending and so the answers are not filled in 1st attempt, and the form is saved in their mobile. The next day or the day after when they visit the patients they go back to the edit saved forms, open it and fill in the missing information and then mark and send the finalized form. But when they try to send it there is an issue of Date of Visit during 1st attempt, they need to change the date to today’s date and then they can send it. What I expect is the date of the first visit only should remain. Please any body can help me with this. Thanks in advance

Hello,
Could you share the related part of your form, please?

You may reference the metadata today variable (${today} to get the first date of saving a form.
Also once(today()) would calculate a date fixed.

1 Like

Greetings!!! Please find here part of my form attached below. Here the date of visit is the date on which the field staff fills the form. The other information which is not available during the 1st visit is field the next day. But if they fill the missed data the other day, there comes the error to change the data??? Any solution
Book1.xlsx (10.2 KB)

Hello @Ash,
You may try changing your constraint to
. = ${today}.

Based on your constraint which fixes the (initial) current date, you might also set this field to read_only true and set the date

  • as default by ${today}.
  • or by calculation ${today} or once(today()).

Or even hide this field (and set it) as calculate type.

1 Like

Hello wroos,
As suggested I tried replacing the date constraint to once(today()). But it is still showing the same error. Please find here my xls form Book1.xlsx (10.2 KB)
for reference. Can you suggest changes in xls form, it will be very helpful. Thank you for your time.