Jump to content

Field formatting in DB Record Title (Add date/time stamp)


kreitttbw

Recommended Posts

Can anyone help me find a way to add the date/time of publishing a new record to a database inside the display title? I found a few things in the community on formatting fields and this for formatting date/time settings, but can't seem to figure out how to implement it in my field.

What I would ultimately love to have happen, is for the title to auto-generate: "RR-1/29/2021-6:49a" to each record I add for that specific category, "routine reviews." I'd like this to be uniform across all entries, and these will be made by several members of my team, so I don't want to leave it to chance that everyone will format it as directed. I want these formatted this way since they will be linked to records and a date/time stamp on title would be best for quick reference when reviewing records.

Does anyone have any suggestions? I appreciate your help!

Link to comment
Share on other sites

You may want to consider making these discrete fields that are then combined on display via a template modification in the manner you'd like.

So, a date field, a category field perhaps that's a selectable list including "RR."

That way, in two years when you decide a better format may be a more appropriate "title," you can simply change the output formatting on your template to reorder or append the additional fields that now are important to you.

Link to comment
Share on other sites

30 minutes ago, Paul E. said:

You may want to consider making these discrete fields that are then combined on display via a template modification in the manner you'd like.

So, a date field, a category field perhaps that's a selectable list including "RR."

That way, in two years when you decide a better format may be a more appropriate "title," you can simply change the output formatting on your template to reorder or append the additional fields that now are important to you.

First, thank you for your response. To ensure I understand fully, you recommend creating the fields I want the title to include, then modify the template with this: 

{$record->customFieldDisplayByKey('your_template_key', 'viewtype')|raw}, using the fields I'd like in the order I'd like them. Am I understanding you correctly?

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...