- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 13, 2021 09:21 AM
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:
Edit: or have I just broken the app by running it on an iOS version of Safari? :grinning_face_with_sweat:
Solved! Go to Solution.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 13, 2021 10:11 AM
Two things:
- 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.
- 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"}])
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 13, 2021 10:11 AM
Two things:
- 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.
- 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"}])
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 13, 2021 12:58 PM
Cheers, I can’t believe I missed this addition to the docs.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 13, 2021 05:49 PM
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.