Set Dynamic Default Value to Today's Date in Record Producer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2024 08:16 AM
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2024 08:20 AM - edited 06-13-2024 08:23 AM
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.
Which would look like this
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2024 11:18 AM - edited 06-13-2024 11:19 AM
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2024 11:22 AM - edited 06-13-2024 11:28 AM
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
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.