Select to view content in your preferred language

How to edit the current date and time

1059
6
11-23-2023 08:50 AM
RachelS
Frequent Contributor

Hi,

 

I'm looking to have the current date in a form with also the option to click in to edit it.

I've been able to add the current date with now() expression however, in the form it won't allow me to click in to edit it if needed.

In the form properties if I tick 'Allow Editing' it says it must be disabled when there is a calculated expression.

Does anyone know of a way to have both, like it is in Survey123.

Thanks 

6 Replies
IssyAmis
Esri Contributor

Hi @RachelS 

If you set up your date and time question without any default dates, it should automatically fill in with the current date when you click to answer the question. You will then either be able to keep the current date or change this.

Could you try this and let me know whether you experience the same behaviour and whether this is sufficient or you would like to achieve a different behaviour?

Thanks!

Issy

0 Kudos
RachelS
Frequent Contributor

Hi @IssyAmis 

The form currently has 'No Value' in the date field and staff have to click into the field then click ok for it to input the current date.

I'm trying to streamline the form with as few clicks as possible.

In Survey123 the current date appears in the field and users don't need to click near it unless they want to change it. I was hoping to have the same in FieldMaps.

 

Every Click counts!

0 Kudos
BrianBulla
Honored Contributor

For the date, just create an Arcade expression.  One line is all you need:

return Now()

This will return the date/time in whatever format you have the field setup for, but it will populate as soon as the user opens the form.  They can always just tap in and make any changes needed.

0 Kudos
RachelS
Frequent Contributor

Hi @BrianBulla 

This is the problem, it won't let you '....tap in and make any changes needed' if Now() expression is added.

Will it let you?

Thanks

 

0 Kudos
BrianBulla
Honored Contributor

Sorry...my bad.  I do some work in VertiGIS too, and in it's mobile app it lets you go back and edit, even with it auto-populating when you load the form.  I guess I mixed the two up.

0 Kudos
RachelS
Frequent Contributor

Ah no worries @BrianBulla , just checking in case it was working for others.

You would expect this functionality to be there, hopefully someone from ESRI can say if it's in the pipeline.

0 Kudos