Help

What do we have here?

Topic Labels: Scripting extentions
Solved
Jump to Solution
3792 3
cancel
Showing results for 
Search instead for 
Did you mean: 

image

Is the fact that the Scripting app linter recognizes this method a bug, or a sign of things to come?

The capital B seems to imply React shenanigans.

I know there have been calls for table creation to be added to the app, but I didn’t think it would actually happen. I still don’t, but I guess that’s one way to place it behind a paywall in style come September (assuming Airtable actually comes through with it this time around lol).

Either way, I’m afraid that trying to run this yields a full stack’s worth of a debugging mess instead of a new table:

image

Edit: or have I just broken the app by running it on an iOS version of Safari? :grinning_face_with_sweat:

1 Solution

Accepted Solutions
Justin_Barrett
18 - Pluto
18 - Pluto

Two things:

  1. What’s passed for fields should be an array of objects, not a single object. The square braces at the end of that fields object example is supposed to indicate that, but because it’s so far down in the text it’s often overlooked.
  2. There’s no “string” field type. For a single line text field, it should be “singleLineText”

This will work:

await base.createTableAsync("yo", [{name: "test", type: "singleLineText"}])

See Solution in Thread

3 Replies 3
Justin_Barrett
18 - Pluto
18 - Pluto

Two things:

  1. What’s passed for fields should be an array of objects, not a single object. The square braces at the end of that fields object example is supposed to indicate that, but because it’s so far down in the text it’s often overlooked.
  2. There’s no “string” field type. For a single line text field, it should be “singleLineText”

This will work:

await base.createTableAsync("yo", [{name: "test", type: "singleLineText"}])

Cheers, I can’t believe I missed this addition to the docs.

That’s because it was added without an announcement.

There are also a few kinks to be worked out. I was trying to use it earlier this week and encountered two bugs related to making linked record fields that support confirmed as bugs. One of the bugs has a fix that had not yet been rolled out. I’m still waiting to find out the progress on the second bug.