Help

Welcome to the Airtable Community! If you're new here, check out our Getting Started area to get the most out of your community experience.

Cannot create table

Topic Labels: Custom extensions
Solved
Jump to Solution
587 2
cancel
Showing results for 
Search instead for 
Did you mean: 

Hi all!

I’m trying to create a new table using base.unstable_createTableAsync following the example in the guide. This is the code I’m using -

const fields = [{ name: "MyField", field: FieldType.SINGLE_LINE_TEXT }];
if (base.unstable_hasPermissionToCreateTable("MyTable", fields)) {
   await base.unstable_createTableAsync("MyTable", fields);
   // and create records
 }

But I keep getting the error

Uncaught (in promise) Error: Can't create table: invalid field config for field 'MyField'.
Creating or updating options for undefined fields is not supported at this time.
    at Mutations._assertMutationIsValid (bundle.js:formatted:7299)
    at Mutations.applyMutationAsync$ (bundle.js:formatted:6813)
    at tryCatch (bundle.js:formatted:94903)
    at Generator.invoke [as _invoke] (bundle.js:formatted:95131)
    at Generator.prototype.<computed> [as next] (bundle.js:formatted:94956)
    at tryCatch (bundle.js:formatted:94903)
    at invoke (bundle.js:formatted:94997)
    at bundle.js:formatted:95030
    at new Promise (<anonymous>)
    at callInvokeWithMethodAndArg (bundle.js:formatted:95029)

What am I doing wrong? Thanks in advance!!

1 Solution

Accepted Solutions

You need to change field: to type:

See Solution in Thread

2 Replies 2

You need to change field: to type:

Will try, thanks so much!