Skip to main content
Solved

Automation script updating duration always results in 0:00 value

  • March 4, 2021
  • 2 replies
  • 46 views

I am passing a duration type field a number value for update:

let [audioFile, duration] = await concatenateFiles(audioUrls);
console.log(duration); // this is showing a number with decimal
// make the update
await table.updateRecordAsync(record, {
    AudioURL: audioFile,
    Duration: duration,
    Status: {name: "Done"}
});

All 3 fields are updated but the duration is always zero after this update. Do I need to supply something other than a number to the duration data type?

Edit: I tried to use Math.round(duration) to no effect

Best answer by kuovonne

Can you show a screen captures of the console.log(duration) output?

What are the setting for your duration field? Does it show hours, minutes, and second? Or does it show only hours and minutes?

Duration fields are usually sent in terms of seconds.

2 replies

kuovonne
Forum|alt.badge.img+29
  • Brainy
  • Answer
  • March 4, 2021

Can you show a screen captures of the console.log(duration) output?

What are the setting for your duration field? Does it show hours, minutes, and second? Or does it show only hours and minutes?

Duration fields are usually sent in terms of seconds.


  • Author
  • Known Participant
  • March 4, 2021

Can you show a screen captures of the console.log(duration) output?

What are the setting for your duration field? Does it show hours, minutes, and second? Or does it show only hours and minutes?

Duration fields are usually sent in terms of seconds.


Duh Greg. The format was showing minutes but not seconds.