Hello - I have field in a smart form in Field Maps that uses a calculated expression of Now() to auto populate the current date. However, when a user goes back to the form to review on another day, I don't want the current date populating. I want the original date to remain in the field. This is meant to be a read only field that populates the date a feature was created and keeps that date. When I go into edit the feature, the date keeps changing to the current date. How can I fix this? Thank you.
Solved! Go to Solution.
You could try using the IsEmpty function to only input the current date when the date field is empty. If the date field already has a value then you can return this so the date isn't updated:
You could remove the calculated expression and force the user to manually enter the date. Once the date is entered it will remain unchanged. Another option is to enable editor tracker so the original creation date is captured without any direct input required from the user. You could make the creation date a field that is not viewable (or viewable if you wish) in the form but the date will still be captured.
Someone else may have a more useful idea but these are simple ones. Hope they help.
You could try using the IsEmpty function to only input the current date when the date field is empty. If the date field already has a value then you can return this so the date isn't updated:
Thank you for the guidance!
I put the following in the Calculated expression for my SiteCreationDate field on my Field Maps Smart Form:
var dateField = $feature.SiteCreationDate //Change this to your date field
Thank you, I got this to work in Survey123, do you know how to construct the expression for use on a Field Maps Smart Form? I have tried this, but it is not working:
Thank you, you solved my issue! I really appreciate the help 🙂