Help

Auto-populate timestamp (date) within Long Text Fields

Topic Labels: Automations
3391 6
cancel
Showing results for 
Search instead for 
Did you mean: 
Heidi_Kwon
4 - Data Explorer
4 - Data Explorer

Is there a way to add timestamps automatically in this field (image attached)? Our company tracks activities updated under “Activity Notes and history” field and for each update/entry, we would like to add a date/time to track the history.

Capture1

6 Replies 6

Welcome to the community, @Heidi_Kwon! :grinning_face_with_big_eyes: This might be possible, but it would help to know more details about the design of your table. Specifically, how do you track the completion of each action? Do you have a separate field (checkbox, date, single-select, ???) for each of those steps?

If you are typing directly into the long text field, your choices are limited.

You could have an automation that adds the time stamp when you select a checkbox or similar, but the delay required to run the automation does not make for a smooth workflow.

You could place a formula field with the NOW() formula next to the long text field, and you could copy/paste that timestamp when you type into the long text field. However, that time will likely be off by 5-15 minutes, and possibly longer.

If the time stamp is related to the last modified time of a particular field or set of fields, you could have a last modified time field next to the long text field, and manually copy/paste that timestamp when you type into the long text field.

You could also use a button script that updates the long text field. Instead of typing directly in the field, the user would click a button to run the script, and then type the action taken into a text box. Finally, the script would update the text box with both the timestamp and the user text.

If the text is generated automatically, without a human typing, such as when particular field is updated, you can use an automation that updates the long text field with both the timestamp and the action.

The example shown only indicates action tracking and no other notes, so I was thinking that the whole thing could become a formula. Assuming for the sake of this example that each action is marked as complete using a checkbox field—with field names like {Action 1}, {Action 2}, etc.—a formula could look something like this:

IF({Action 8}, DATETIME_FORMAT(SET_TIMEZONE(LAST_MODIFIED_TIME({Action 8}), "timezone_specifier_here"), "L - LT") & " - Action 8 taken\n") &
IF({Action 7}, DATETIME_FORMAT(SET_TIMEZONE(LAST_MODIFIED_TIME({Action 7}), "timezone_specifier_here"), "L - LT") & " - Action 7 taken\n") &
IF({Action 6}, DATETIME_FORMAT(SET_TIMEZONE(LAST_MODIFIED_TIME({Action 6}), "timezone_specifier_here"), "L - LT") & " - Action 6 taken\n") &
...

Screen Shot 2021-12-21 at 8.19.12 AM

This setup could be modified as needed if a different field type is used to mark action completion (date field, single-select field, etc.). If you want to also add optional notes about each action, you could use separate notes fields like {Action 1 Notes}, {Action 2 Notes}, etc. and modify the above formula to insert those notes appropriately so that everything is in one place.

Re: If the text is generated automatically, without a human typing, such as when particular field is updated, you can use an automation that updates the long text field with both the timestamp and the action.

I am attempting to use a Long Text field for a similar purpose, but instead based on Budget (a currency field). Updates to the Budget field trigger the “Budget Register” to register the “Last Modified Date | Budget”. The issue I’m running into is formatting the update record piece of the automation to appear one line per update and listed newest to oldest. Can you

What I want:
2022-06-28 | $3
2022-05-28 | $2
2022-04-28 | $1

What I’m getting:
2022-06-28 | $3 2022-05-28 | $2 2022-04-28 | $1

image

I’m sure it’s a small fix, but any direction would be helpful! Thanks!

Put a new line in the update record action by pressing shift+enter.

I knew it had to be simple. THANK YOU! :upside_down_face: