Auto input current date Field maps forms

9217
15
05-12-2021 10:54 AM
LouiseHarris1
New Contributor III

Is it possible to set the date to automatically enter the current date in Field Maps form? I have tried using these expressions, now() and today() but you still have to click into the field and select the date from a calendar that appears.

 

 

15 Replies
DougBrowning
MVP Esteemed Contributor

I also have found that if you make a Date field required (set not allow nulls) then the date defaults to 12/21/1899 for some reason.  The user must manually hit the today button, which most forget to.

Where is the 1899 coming from?  If you are going to prepopulate a date it should be today.

thanks

DougBrowning
MVP Esteemed Contributor

Anyone else have any workaround here?  It is already creating a QA nightmare for us.  The point of required was to solve issues like this.  But instead of it starting blank and forcing the user to pick it defaults to 1899 so the user just skips it and keeps going.

I do not see a way to default to today?  The field default wants a static value not a formula.  Note I am on Map classic.

Any ideas?  thanks 

BenWalker1
New Contributor III

We noticed this today as well and we could not get it auto-opulate. I think it would be very useful as it will keep the number of clicks that field users need to make to get their job done.

JonathanMcDougall
Occasional Contributor III

Could this be added as to the ideas page? Really frustrating especially the 1899 date - not sure why ESRI think this is acceptable.

DougBrowning
MVP Esteemed Contributor

It is happening so often I added some Arcade to the popup to help point it out to crews.

Set the formula (for us anything not this year is bad)

Check FieldEvalDate {expression/expr33}
if (Year($feature.FieldEvalDate) < Year(Today())) {
     return "Warning you have entered a bad date!"
}
else {
     return ""
}

Then in the popup text add the expression in red.

DougBrowning_1-1622553824352.png

Crew sees

DougBrowning_0-1622553796628.png

Hope that helps

DougMorgenthaler
Esri Regular Contributor

For those of you who haven't done so already, I'd encourage you to comment/contribute to this idea.

CBeck17
New Contributor

My solution was to allow the table to accept null values but for the date field to be a required field. It defaults to the current date and time that way.

0 Kudos
DougBrowning
MVP Esteemed Contributor

I thought not allow nulls was how you set read only.  Did this change?  Where did you set this?  

Thanks

0 Kudos
CBeck17
New Contributor

Allow nulls was configured in the fields configuration in Pro. Required was selected in the form editor for field maps. Not ideal but it works well.

0 Kudos