Nov 14, 2024 07:53 AM - edited Nov 14, 2024 07:54 AM
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!
Solved! Go to Solution.
Nov 14, 2024 05:46 PM
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?
Nov 14, 2024 05:46 PM
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?
Nov 15, 2024 05:45 AM
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!!!! 🙂