Jun 29, 2021 11:43 AM
I have STARTTIME, DURATION,CALCULATEDENDTIME and ENDTIME fields.
After entering values for STARTTIME and DURATION, the CALCULATEDENDTIME adds the two.
My automation is setup to trigger when a value is entered into DURATION, and copy CALCULATEDENDTIME to ENDTIME .
Here is the problem: automation does not read the complete data entry, just it’s first typed digit!!!
The CALCULATEDENDTIME does the DATEADD with each digit I type- ONE DIGIT AT A TIME!!!, and automation thinks I’m done.
Example-if my STARTTIME is 12:00 and DURATION is ‘60’ minutes:
CALCULATEDENDTIME changes to 12:06 immediately upon typing the first digit of the DURATION (the ‘6’), the automation then triggers and assumes the CALCULATEDENDTIME is complete.
I continue typing the DURATION (‘0’), but the trigger is already executed.
Any suggestions to have it work with the complete entry?
Solved! Go to Solution.
Jul 04, 2021 10:40 AM
Thanks for the suggestions and links.
I wanted it stay automated, so after the automation to copy CALCULATEDENDTIME to ENDTIME, I have a new automation that triggers for the new condition field LAST_MODIFIED_TIME({Duration})>LAST_MODIFIED_TIME({ENDTIME}
Jun 29, 2021 11:49 AM
Create a checkbox field and trigger your automation when you check the checkbox.
Jun 29, 2021 12:36 PM
This post also has some other options.
You could also use a script attached to a button field that copies the value from one field to another. Here is an example of a very basic script.
const table = base.getTable("Table 1")
const fldCalculatedTime = table.getField("CALCULATEDENDTIME")
const fldEditableTime = table.getField("ENDTIME")
const record = await input.recordAsync("Pick a record", table)
await table.updateRecordAsync(record, {
[fldEditableTime.name]: record.getCellValue(fldCalculatedTime)
})
Note that this script does not have any error checking and will throw an error if the CALCULATEDENDTIME time is #ERROR
Jul 04, 2021 10:40 AM
Thanks for the suggestions and links.
I wanted it stay automated, so after the automation to copy CALCULATEDENDTIME to ENDTIME, I have a new automation that triggers for the new condition field LAST_MODIFIED_TIME({Duration})>LAST_MODIFIED_TIME({ENDTIME}