Skip to main content

Creating a duration field throws an error despite field options being correct

  • November 24, 2020
  • 2 replies
  • 16 views

Andy_Cloke
Forum|alt.badge.img+17

MacOS Mojave 10.14.5 (18F132)
airtable/blocks: 1.0.0

table.checkPermissionsForCreateField('someFieldName', FieldType.DURATION, {durationFormat: 'h.mm.ss.SSS'})

Throws this error:
“Can’t create field: invalid field config. Failed schema validation: .0.type does not match one of the possible values, .0.options.precision is missing, durationFormat is not included in th…”

Same for table.createFieldAsync.

Despite these being the correct options according to Airtable Blocks SDK

Creating other field types works just fine. @somehats could this be a bug?

2 replies

  • Participating Frequently
  • 37 replies
  • November 24, 2020

Thanks for reporting this Andy! Looks like a typo in our documentation: the format should be h:mm:ss.SSS, not h.mm.ss.SSS. Apologies for the confusion, we’ll get the docs updated.


Andy_Cloke
Forum|alt.badge.img+17
  • Author
  • Known Participant
  • 91 replies
  • November 24, 2020

Thanks for reporting this Andy! Looks like a typo in our documentation: the format should be h:mm:ss.SSS, not h.mm.ss.SSS. Apologies for the confusion, we’ll get the docs updated.


That works, thanks a lot!