How to set the default value of a datetime field to $NOW?

I’m trying to create a datetime field that must not be empty. I’d like to set its value to the dynamic variable $NOW, if possible — so if the user doesn’t enter an explicit value, the current timestamp is saved.

The problem I’m having is that if I enter $NOW or {{ $NOW }} in the ‘Default Value’ field, once I close the ‘edit field’ interface, it evaluates $NOW and puts the resulting value in the field — i.e., it’s no longer a “dynamic variable”.

I feel like this should be something quite easy to do, but I’m struggling…

when creating the Datetime field, click “continue in Advanced Field Creation Mode”.

Then you’ll see a field called “On Create” that proposes 2 options:

  1. do nothing
  2. Save CurrentDate/Time

When you create a new item, the field is empty, but if you save, the current date/time is entered.

Is that what you are trying to achieve?

I don’t think it’s doable by default, the only way you can do it is creating flow which runs after the user submit the item inside a run script.

Also I think you can use Computer Interface Extension to reach the same goal.

Thank you for the suggestion, @Posoroko! When we select “save current date/time”, it always enters the current datetime, regardless of whether the user has already entered something or not — we only want the ‘default’ value if one hasn’t been already entered by the user (sometimes they are recording a past interaction, not one happening right now).

I’ll have a look at the Computed Interface extension suggested by @Abdallah. It’s surprising that this is not something easily achievable…

You can set the default value to now() :alarm_clock: