Skip to main content

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 = s{ 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 oas _invoke] (bundle.js:formatted:95131)

at Generator.prototype.<computed> gas 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!!

You need to change field: to type:


You need to change field: to type:


Will try, thanks so much!


Reply