Skip to main content
Solved

Automation triggers before data entry is finished

  • June 29, 2021
  • 3 replies
  • 40 views

Forum|alt.badge.img+10

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?

Best answer by Paul1

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}

3 replies

ScottWorld
Forum|alt.badge.img+35
  • Genius
  • June 29, 2021

Create a checkbox field and trigger your automation when you check the checkbox.


kuovonne
Forum|alt.badge.img+29
  • Brainy
  • June 29, 2021

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


Forum|alt.badge.img+10
  • Author
  • Inspiring
  • Answer
  • July 4, 2021

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}