Save the date! Join us on October 16 for our Product Ops launch event. Register here.
Dec 06, 2022 11:55 AM
Before starting this, I will say I have no background in writing script. Any script/code I have posted was created using OpenAI API.
What I am trying to create is an automation that upon an update in a selected Single Select Field will begin an automation that utilizes a script to input today's date & time in an adjacent Time/Date field.
When I entered the code below into the Edit Script window and ran a test, the test failed with an error stating "
var today = new Date();
var options = {
timeZone: 'America/New_York',
hour: 'numeric',
minute: 'numeric',
second: 'numeric',
hour12: true
};
var timeString = today.toLocaleString('en-US', options);
var dateString = today.toLocaleDateString('en-US');
var dateTimeString = dateString + ' ' + timeString;
var dateTime = document.createElement('div');
dateTime.innerHTML = dateTimeString;
document.body.appendChild(dateTime);
Solved! Go to Solution.
Dec 07, 2022 06:14 AM
Dec 07, 2022 06:14 AM