Set Dynamic Default Value to Today's Date in Record Producer

Trish Mac
Mega Guru

Hello - I have a record producer based on an Incident that has a Date/Time field for an "Opened(opened at)" and has the Dynamic Default Value set to Now (Date and Time) which works well. (See attachment.) However, they want to change this to show Date only.   I'm not a scripter and I've been researching how to make this happen.  I haven't found any solution that works so far.  I tried changing it to Now (Date) in hopes it was that simple but alas, it is not.  Any suggestions?

 

Thanks,

Trish

3 REPLIES 3

Zach Koch
Giga Sage
Giga Sage

Unfortunately, you have the Type on the field configured as Date/Time, so it is always going to show time, even if it's 00:00:00. To show only date, the field Type would need to be changed to Date.

ZachKoch_0-1718292003577.png

Which would look like this

ZachKoch_1-1718292038458.png

However changing data Types for fields is not best practice and can cause data loss. It is recommended that you create a new Date field, then run a fix script to copy dates into your new field from your old field.

If this information helped resolve your issue, please remember to mark response correct and thumbs up to help future community members on this information, thanks!

Hi Zach, I added a new field with a Date type to the form but it doesn't autofill.  What would the Default Value need to be to have it autofill?  

 

If only care about dates going forward and date/time can stay there for past tickets, do I still need to run a fix script?  I don't think times being there on older and existing tickets is a concern.

 

Thanks,

Trish

 

If you don't care about historical records, then it would be a matter of finding the mechanism, likely a client script on the table, or default value on the field, and adjusting it to the new field.

In the case that it is the default value, the new field you created will need the default value set to todays date, with

 

ZachKoch_0-1718303274591.png

 

In the case that it is a client script, you will need to find change any reference to the old date/time field, and update it with the Name of your new field.

If this information helped resolve your issue, please remember to mark response correct and thumbs up to help future community members on this information, thanks!