Need development and API help? Ask your questions here!
Recently active
Hi, I decided to use Airtable today to store a spreadsheet-like set of data because it seemed easier than setting up a database (I would usually use POSTGRES locally). I’m getting the data from various sources - online services, web page scraping, and so I create the data records and then need to update them later with data from different sources. My “primary field” is ISBN, and it’s unique for each record, each one representing a book. Why does my record need an additional “id” that I have to query for? Is it possible to make my ISBN the id so that I don’t have to query for the “id” that Airtable is generating? It’s so much overhead to make the additional query each time for the record “id” when the ID that I’m using is ISBN and it would work fine for me to make that the primary key for the table(base). Thanks for any pointers! alexis
I’m running a scripting app that loops through all the records in my Airtable using await table.updateRecordAsync() in a few fields, including a single-select field. Every once in a while, through human error or something else, we’ll wind up passing something to the script that makes it try to update the single-select field with some value that isn’t one of the options for that field. Right now what that does is cause the script to throw an error and abort entirely. What I’d like to do is have it throw an error message and continue on to the next record in the table. What’s the best way to go about this? Excerpt of the script in question below (for context, we’re a nonprofit helping folks in the criminal justice system): if (parsedNewDate.valueOf() != parsedOldDate.valueOf() || postSentencePrison != newPrison|| inmate.releaseCode) { if (parsedNewDate.valueOf() != parsedOldDate.valueOf()){
I’ve built a custom app which has functionality to both use it in the sidebar or have it triggered when you press a button field. I’d like to force the app to reload any time the useRecordActionData hook detects a change. How would I go about pinning that kind of functionality to the hook? I’m trying to reset all the various React states whenever there’s new info from the hook.
I’m running issues when running block release to deploy my Airtable app. I’m using npm workspaces as I develop my Custom Airtable App since I’m using a monorepo to make code management and sharing convenient. Here’s the basic folder structure for my project: project_root/ packages/ - houses workspaces common/ contains code shared by airtable_app and server workspaces package name: @shoptable/common airtable_app/ - contains the airtable block app server/ - another workspace Here are the steps I take before running block release: npm i from project_root cd packages/airtable_app block release I run into the following error: building copying package.json file copying package-lock.json file ❌ Error: package-lock.json does not exist! Failed to build the block code! There’s only a package-lock.json generated at the project_root level. How can I get around this issue with my development environment? Current Workaround The only way I’ve found that works is to run npm pack
In the process of building an Airtable AUTOMATION that will update multiple records at once on a daily schedule, I discovered that’s not currently supported. That leads me down the path of trying to run a script that will run on said daily schedule within the AUTOMATION. However, I have a very novice understanding of JavaScript and I’m struggling to apply Airtable’s specifics when it comes to writing a script. Is there anyone willing to help me out? I tend to learn a TON every time I have the opportunity to modify a script. But I need some help getting there. HERE’S WHAT I NEED A SOLUTION FOR: On a daily basis, I’d like to change the {Status Field} —which is a “single select” type— of a list of records (when the status is “Option 2”) to have a status of “Option 1”). My knowledge falls short on syntax. So I don’t know if it’s easier to comb through the entire table using a “for loop” or calling a view that does that work for me. But I’m lost when it comes to much more than identif
Hi there - I am trying to configure an automation but when I put in output.text and recordAsync, I am told these are not functions and receive an error. What can I do to fix this?
Hello. I am trying to create a script that updates the color of an option within the selection field. Is there a way to do that? I want to keep the same text but only change the color because when I create new options via API they are all created with the same color.
boy, where do I start. so after two weeks of trying to get Airtable to bend the knee to more than 100 outputs per rest API call i have given up. to get to know my environment i have a document with 150 rows and 12 columns that i would genuinely love to import to BI too do some visualization magic to but i’m stuck. I have at the moment connected Via rest api the data from the air-table “database” with the https://api.airtable.com/v0/XXXXX/XXXXX?api_key=XXXXX call. Yet of course that only return 100 values and in the advanced editor it retrieves as so. from the wonderful community that surrounds this awesome Database i’ve found many sources that prompt me to deal with the Pagination that has tormented people in the past so I decided give it a shot and after a lot of shuffling around the internet i’ve come to believe the solution is to do this and replace the above code with this. yet all i gat is one column table with error and no data. is this the right direction? in newish to air tab
I’m looking to connect a number plate (license plate) recognition camera with an Airtable database so that I can have people book into a car park and open an automatic car park gate when the camera sees them arrive. Then in Airtable I’d like to be able to see the arrival time and the exit time of cars in the Airtable database. Has anyone come across a way of doing this?
is there a way to filter a table based on first world in a column. (like search in sql) i have a table and it has products, i want to get all products starts with ‘television’
Despite i set to false flag “Allow linking to multiple records” for multipleRecordLinks field options of this field is exactly the same as this flag will be set to true. How can i know in script that this flag is disabled? Thanks
Okay so I’ve got a list of pretty standard tasks every time I host an event, so I’d like to automatically add them to my task list for each new event I add to my table. Below I have my template of tasks. Using the scripting block, I’m able to choose which event I want to apply this template to. Take a peek at the script below (which borrows heavily from the Record Template example), and example base here! Would love to know you how use this, and if it’s helpful. // pick tables & views from your base here let checklistTable = base.getTable("Planning Check List"); let templateView = checklistTable.getView("Template View"); let projectsTable = base.getTable("Projects"); let projectsWithNoChecklistView = projectsTable.getView("No Checklist"); // select an event to create a checklist for let selectedEventRecord = await input.recordAsync( "Choose event to create checklist for", projectsWithNoChecklistView ); if (selectedEventRecord) { // load in all of of the tasks that our
I have a list >700 of customer IDs that I want to know more about. How can I query them in bulk rather doing it one by one?
Hi all, We’re excited to release an open beta of a new Blocks Testing package! This new npm package will make it much easier to write tests for the apps that you build - crucially, without having to rely on the Airtable backend to run your block in a testing environment. With the Blocks Testing package, you’re able to create a new test driver instance: import TestDriver from '@airtable/blocks-testing'; import MyApp from '../frontend/my-app'; const testDriver = new TestDriver({ /* test fixture data here */ }); render( <testDriver.Container> <MyApp /> </testDriver.Container>, ); Add input to the app: await testDriver.base.createTableAsync('a new table', [ {name: 'address', type: FieldType.EMAIL}, ]); And verify that the app works as expected: const checkbox = screen.getByRole('checkbox'); expect(checkbox.checked).toBe(true); The Blocks Testing package is compatible with many popular testing frameworks, so you can choose your favorite way to write your t
I have a table in which I am using a start date+time. The end time needs to be formatted as a date if I want it to work in my Calendar view (which is shared to various departmental users). I have ‘Class 1 Start’ [2/6/2021 8:00AM], I also have a field where this class has a defined meeting time [105 minutes]. I attempted to use a simple {dateadd} formula to define the ending time of Class 1. Hoping to use the start and end times together in the Calendar View (Airtable - Shared Calendar). Other fields have unique end times so I hard enter them, but we have 5 classes per course so I’m trying to build out a script that would remove the opportunity for data entry errors/oversight. Currently I use it where Classes have no end time, so they populate the calendar as a default 1 hour block. The ical feed thus is incorrect when I share this for use. I have no experience with Scripts and my cursory search didn’t get me very far. Any guidance where I can piece together a script would be welcomed.
I want to log my Exceptions from my .Net Application to the Airtable using the NLog After configuring the nlog.config file. getting the following error in the Nlog internal logs: Error WebServiceTarget(Name=ws): Error sending request Exception: System.Net.WebException: The remote server returned an error: (422) Unprocessable Entity. at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult) at NLog.Targets.WebServiceTarget.<>c__DisplayClass67_0.<CreateSendContinuation>b__1(IAsyncResult r) Here is my nlog.config file <?xml version="1.0" encoding="utf-8" ?> <nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" autoReload="true" throwConfigExceptions="true" internalLogLevel="info" internalLogFile="c:\temp\internal-nlog-AspNetCore3.txt" > <extensions> <add assembly="NLog.Targets.Http" /> </extensions> <targets> <target
Hi ! I created a rollup field I want to access via the API. Aggregation formula is AVERAGE(values)*1.20 values are integer. Custom json decoder (written in Elm) fail at parsing this field. I checked the api documentation and field’s type is number or string. I expect it to be a number since it’s formatted as an integer and all input values are also integer. What does it mean ? How to coerce the type to be only a number ? I tried to consume the aggregated value in another field formula but it inherits this number or string type. Thanks for your help!
I have a very minimal understanding of JavaScript and cannot write anything from scratch (yet). But I believe I could modify something pre-built. Elements I already have: Base 1: A base with all of my Slack Workspace members and their Slack ID(s) as well as their DM Links Base 2: Another base of incoming inquiries (that populate from an Airtable form) that also has “Lookup” fields that pull the user’s Slack ID and Direct Message (hyperlink) from Base 1. Request Using Airtable Automations I’d like to trigger a scripting block to send a Direct Message to a Slack user in my Slack Workspace (using their <{Slack ID}—Lookup field> in Base 2) when the status of an incoming inquiry is “XYZ”. NOTE: I am aware that Automations has a Slack notification feature, but you can only post to a channel or (the same) Slack ID each time the automation runs. I’d like the ability to dynamically send a message to a different Slack ID (since I have that data), based on the record info, each time
Why can’t we create multiple API keys? I want to give an API key to a potential subcontractor, but once his work is finished, I want to revoke that API key. If there’s only one API key for my entire account, this means I have to go update the API key in a bunch of external, 3rd-party systems. If I could just revoke the unique API key for that one subcontractor, I don’t have to update anything. This seems pretty close to best practice. Am I missing some kind of feature that would accomplish this a different way?
I use Airtable to manage product production. I have one view that is for my product records, “MFG”, and there are several categories for each record in that view. I have another view for “Ingredients”, and at present I have to manually adjust the amount of the ingredient every time I produce something in order to maintain an accurate inventory level. Is there a way for me to trigger a recalculation of that ingredient amount when I move the record in the “MFG” view into a category created to initiate that trigger? Does this make any sense at all? I want to be able to, when I produced a batch of something, have all ingredients used in that batch automatically deducted from the record in the “Ingredients” view. In the “MFG” view, each ingredient has its own column, and each of those columns has its own record in the “Ingredients” view. If anyone can point me toward learning resources or help in any way, I’d really appreciate it. Maybe this is an impossible task?
Airtable has been a godsend to our organization, but none of us are very familiar with scripting. We have a need for a what I imagine is a simple script, but the examples I’m finding in the community and outside are much more complicated. We have a few employees who only add simple orders in between their tasks. Normally we would do this with a form, but the multi table process is frustrating. Basically we have 3 tables Customers, Orders, and Order Line Items. I want to add a button to our Customer table that runs a script that creates a linked record to that customer in the Orders table with today’s date and then launches our Order Line Items Form with the “Order” field prefilled with the record just created. That way from a read only share of our base they can hit the button and (in the background) an order is created and the form to add items is automatically launched. The examples I am finding around seem much more complicated and I’m having trouble parsing them. Thanks for you hel
I am trying to create a table with linked records using a one-to-many relationship. How would I create a Contacts table with a link to ContactPhones where a single Contact record is linked to multiple ContactPhones records? Below is one of the things I have tried based on the base.createTableAsync and the FieldType documentation. import { FieldType } from "@airtable/blocks/models"; import { useBase } from "@airtable/blocks/ui"; export async function createContactAirTables() { const base = useBase(); if (!base.getTableByNameIfExists('ContactPhones_')){ await base.createTableAsync("ContactPhones_", [ {name: 'Id', type: FieldType.SINGLE_LINE_TEXT}, {name: 'PhoneNumber', type: FieldType.SINGLE_LINE_TEXT} ]); } if (!base.getTableByNameIfExists('Contacts_')){ await base.createTableAsync("Contacts_", [ {name: 'Id', type: FieldType.SINGLE_LINE_TEXT}, {name: 'BusinessName', type: FieldType.SINGLE_LINE_TEXT}, {name: 'Contac
Hello, I’m new to Airtable, so forvige me if this has already been asked or if it is not in the right category. In my database, I have cells that contain both text and one or more hyperlinks I want to extract the URL from those cells and put them in a new column and I have no idea how to do so. I would love to get some help on this please, thanks !
Hi, I’ve been trying to filter a Rollup field through the API, using the filterByFormula option. It returns a string of numbers, since it uses the ARRAYCOMPACT(values) as the aggregation function. (ex: Product age : [“10,11,12,13,14,15,16,17”] ) I can’t find how to filter through these number, Find or Search doesn’t return any values ( ex: (SEARCH({Product Age}, “13”) > 0) , and also not with a simple “=” ({Product Age} = 13) . I want to be able to filter by that field, but I’m currently unable to find out what’s the correct format for the filterByFormula option. Can anybody help me? Best, João
Already have an account? Login
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.