Help

Adding Date Into Find Records Automation

Topic Labels: Automations
Solved
Jump to Solution
248 2
cancel
Showing results for 
Search instead for 
Did you mean: 
David_Weigle
6 - Interface Innovator
6 - Interface Innovator

Hello!

I'm looking to have a daily email automation run with a list of Found Records. I'd like the subject line of the email to have the current date. 

I see that I can add in a List of the Dates for the Found Records, but...it will show the date for EVERY record, rather than just one instance. 

Is there a way to suppress that to only the first instance of the date so that my subject line doesn't read "Daily Attendance Log DATE DATE DATE"?

Thanks in advance for any help!

 

1 Solution

Accepted Solutions
TheTimeSavingCo
18 - Pluto
18 - Pluto

If you're on a Teams and above plan I'd recommend just using a Run a Script action with the following:

const date = new Date();
const formattedDate = date.toLocaleDateString('en-GB', {
    day: '2-digit',
    month: 'short',
    year: 'numeric'
});

output.set("date", formattedDate);

This outputs the date as DD MMM YYYY, e.g. "15 Nov 2024".  If this format doesn't work for you let me know and I'll tweak it

---
A non-scripting solution would be to create a formula field that displays today's date in the format that you want, i.e. `DATETIME_FORMAT(TODAY(), '[FORMAT]')`.  You'd then grab the record that contained this field via a Find Record action and use it in your automation, does that make sense?

See Solution in Thread

2 Replies 2
TheTimeSavingCo
18 - Pluto
18 - Pluto

If you're on a Teams and above plan I'd recommend just using a Run a Script action with the following:

const date = new Date();
const formattedDate = date.toLocaleDateString('en-GB', {
    day: '2-digit',
    month: 'short',
    year: 'numeric'
});

output.set("date", formattedDate);

This outputs the date as DD MMM YYYY, e.g. "15 Nov 2024".  If this format doesn't work for you let me know and I'll tweak it

---
A non-scripting solution would be to create a formula field that displays today's date in the format that you want, i.e. `DATETIME_FORMAT(TODAY(), '[FORMAT]')`.  You'd then grab the record that contained this field via a Find Record action and use it in your automation, does that make sense?

That worked! I ended up changing the formatting to MM/DD/YYYY after doing a little research on the internet as to change the format. 

Thanks so much!!!! 🙂