Need development and API help? Ask your questions here!
Recently active
Dear Community, I want to automatically link records by linking incomming subscriptions (Table called EmailSubscriptions) to certain dogbreeds (!Hondenrassen). I need to match based on a unique id. This ID is in (EmailSubscriptions the “Kind”) and in the Table !Hondentassen also “Kind”. I want to link thise two automatically when a record enters a view. Using the a automation to run the script. I made this script based on some community scripts but it doesn’t seems to work. Can anyone help? /Define the !Hondenrassen table and query let cmpTbl = base.getTable(“!Hondenrassen”); let cmpQuery = await cmpTbl.selectRecordsAsync(); //Define EmailSubsciptions table and query let cntTbl = base.getTable(“Email”Subscriptions); let cntQuery = await cntTbl.selectRecordsAsync(); //Loop through the records and find the Kind for (let record of cmpQuery.records) { let cmpid = record.getCellValue(“Kind”); //Loop through linked table and match ID Values for (let cntRecord of cntQuery.records) { if (c
Hi all, I am creating a transportation dispatching system. One of the things I’m having trouble with is creating duplicate records. For example, I take person A to the grocery store on Monday and Thursday every week at 0900. I can manually duplicate the record to reflect this, but it would be far less time consuming if I could duplicate the original record indefinitely or for a specified end time. How could this be accomplished? --Thanks!
N: Can’t set cell values: invalid cell value for field ‘famille’. Cell value has invalid format: must be a string this is my script //Replace “Code cable” with column name which has the values you want to look up for (let record of mainTableRecords.records) { let lookupValue = record.getCellValue("Code cable"); //Replace "Name" with column name which is the range to search in //Replace "Famille" with columnn name which value should be returned for (let rangeRecord of lookupRangeRecords.records) { if (rangeRecord.getCellValue("Name") === lookupValue) { let returnValue = rangeRecord.getCellValue("Famille"); //Replace "famille" with column name from mainTable which should contain the link await mainTable.updateRecordAsync(record, {"famille":returnValue }); } } }
That is probably a very confusing title, I will do my best to explain what I want but I am pretty new to coding and Airtable. I already have a Grid View with multiple fields, and I am using the Forms View to add to my Grid View. In my Form I have a multiple select option where I can add multiple pieces of equipment that will be assigned to one project. However, for my Gantt Views I need the Primary Field to only contain one value. Right now I am using a formula to define my Primary Field. I think what I need to do is create a script that will extract the individual values of the array and assign them their own records. You can see from the images that not every record contains an array. Just for the sake of clarity, my Forms View updates the “Equipment # and Description” field, which has the lookup field “New # (Don’t Use)” which is what is used to define the Primary field. Not really an elegant solution but it is what I have so far. My Forms View: My Table, with primary field formula
Hi I managed to get a button to run a script to populate a linked field with a unique value, thanks to the exellent advice by @JonathanBowen The link to the topic is here As the populated field only ever has the value pasted by the script or is empty, I wonder if I can adapt the script to only run if my target field is empty and display a warning and abort if it isn’t? For ease, here is the script… let repoT = base.getTable('Repo'); let sourceT = base.getTable('Source'); let record = await input.recordAsync('Pick a record', sourceT); // let name = record.getCellValue('Part 1') + '-' + record.getCellValue('Part 2'); let name = record.getCellValue('Data'); // create the record in the repo table let newRepoRecord = await repoT.createRecordAsync({ 'Name': name }) // set variable for today's date let now = new Date().toLocaleDateString("en-GB"); //note that newRepoRecord is the record ID of the created record // see this by logging the result: console.log(newRepoRecord); // n
Happy Thursday! Regarding this old issue: Can only send 15 mutations every 1000ms - Development and integrations / Scripting app - Airtable Community Forum The underlying cause has been fixed, as per Airtable support. I stumbled upon it in a completely different scenario and reported it around a month ago. You can verify by clicking and holding either arrow button of an input.config.number element inside the Scripting app settings UI. Doing so would have thrown an error before (after around 15 reactions, I suspect :slightly_smiling_face: ) and it doesn’t any longer.
Ive looked at numerous other community posts but don’t seem to be understanding this. I want to update a linked field with a room location. The location is being provided by users selecting it from a list via recordasync, and I’m storing it as a string with .name. This unlinked field updates without issue: sourceTable.updateRecordAsync(recordID,{'nonlinked location': roomName}); but i can’t get the linked table to update no matter how I format the portion after the :. I’ve tried sourceTable.updateRecordAsync(recordID,{'linked location': [{id: roomName}]}) and other variations of that to no avail. I believe it has to do with the location being passed as a string to the linked array, but I’m not sure how to format either the input or the updaterecord to accept the change. The script is meant to accept a room choice, then the user enters an Item Number and the script updates the location of that item with the room chosen in step 1. let location = base.getTable("Rooms"); let sourceTable
Hey guys – quick question. I have multiple sales representatives, and I’d like to be able to auto-assign them to a lead when it comes in. Is there a way to accomplish this in Airtable?
Hi Airtable community, I’m a complete novice at scripting, so bear with my ignorance here. I have a table with three fields: Email, Converted Email, and a Button. I want the button to trigger a script that encodes whatever’s listed in the Email field to base 64 and push it to the Converted Email field. I’ve gotten this to work so far using this script: let table = base.getTable("EncodeEmails"); let record = await input.recordAsync("Converting record", table); let b64 = btoa(record.getCellValueAsString("Email")); output.inspect(b64); This outputs the base 64 converted email in the scripting app, which is great. But I want that result to push to the Converted Email field in the record. I’m not quite sure what to do next. This is what I have so far, pieced together using examples: let table = base.getTable("EncodeEmails"); let record = await input.recordAsync("Converting record", table); let b64 = btoa(record.getCellValueAsString("Email")); let recordId = b64.record[0].id; await table.u
I have an automation that runs a script, when a record enters a view. When I run the script as a test (in the automation setup mode), there’s never a problem. However, if the automation triggers, the script is always stopped by execution time limit. Any idea how to fix this? It’s usually only a couple of records int he view that triggers, so it shouldn’t be heavy computing at all. //Copy Values to a linked field //Declare tables var activeTbl = base.getTable("Delivered"); var activeView = activeTbl.getView("Createing Link to Prepared") var linkTbl = base.getTable("Prepared"); var linkView = linkTbl.getView("Prep for PD"); //Declare queries var activeQry = await activeView.selectRecordsAsync(); var linkQry = await linkView.selectRecordsAsync(); //Loop through your active table records for(let activeRec of activeQry.records){ //Declare field in the active table you'd like to match let actField = activeRec.getCellValueAsString("Referenz") //If a Number, use getCellValue inste
When using remoteFetchAsync with my own server API the response.json() has clear character encoding issues: Promoción desde solo 29â¬/dÃa. Calling the API in browser or Postman returns as expected. I spent some time checking Headers in the request, the server response encoding etc… But when I used the normal fetch routing the API through the https://cors-anywhere.herokuapp.com website it worked and returned the correct characters! Is the server used in remoteFetchAsync not encoding correctly the response?
Need help to call/run a script when a row is created in Airtable. The script will do a REST API call to another server. We tried to trigger “When Record Created”. but it’s not running the script. need some suggestions.
Hello there I would like to avoid user copy and paste in one of our tables. For this is have created a button and modified the excellent ‘copy values from one field to another’ script by @JonathanBowen to my needs. This works really well to copy a value from my source field to a target field, replacing the existing value in the target and leaving a create date in the source field. Now what I want to achieve is that that target field is a linked primary field in another table. At the moment users do this manually with copy and paste, but we do not want to introduce the idea of copy and paste as a function, a button would make this more elegant. The idea behind it is that we use one table to build a product by formula from other field values, so that we end up with a full parts code in one field (the source). This is then pasted into the linked field to create a new record in a parts table. However if I change the field name in the code from a standard text field to the linked field I ge
Is it possible to get visible fields for a chosen table and view? I checked the Airtable scripting documentation and I cannot find the property to check if a field is visible for that view
I have several very large bases for which I need to manage the field permissions of multiple collaborators. It would be extremely useful if there was an app/script that exported the data on who has what permissions for every field. At the moment I’m compiling a “directory” of this information manually and it’s every time consuming! Does anyone have anything that could assist with this?
Hi all, I see a BaseProvider in the API documentation . By reading the docs I am not able to understand what it is designed for. Are there any samples that show how to use it? Has anybody used it before or if you are aware of any github projects which use this, can you please share them? Thanks in advance.
Has anyone successfully integrated these (Airtable + Integromat + Webflow) where file attachment deletion is working? i.e. If I remove/delete an attached file in Airtable it gets removed in Webflow as well. Thanks in advance
I’m trying to find a way to pull the field description (described here: Adding a field description – Airtable Support) via the REST API or Airtable scripts. Is there any way to access this data outside of the web interface? Thanks in advance!
Hello I am trying to create a script to enter in new information if needed or change information on a record if needed based on user button. I cannot seem to get the updaterecordasync to work. For the first one I just tested it by automatically changing a field ‘employees’ and giving it a set value, which I have been unsuccessful at getting to work. Ideally I would like to take user input and put it into the record field. I have attempted this on second part of the if statement with no luck either. Thank you for any help.
after using the API documentation it’s confusing trying to find info for the scripting app. I was expecting to be able to use maxRecords to grab the first record but that doesn’t seem to work. What am I missing here? let queryResult = await table.selectRecordsAsync({ sorts: [ // sort by "ID" in ascending order {field: "id"}, // then by "Title" in descending order. {field: "title", direction: "desc"}, ], maxRecords: 1 });
Hi there! After searching around for a while, I have not been able to find a script with the function of finding duplicates within one cell. I have found workarounds with Airtable automations, the only task holding me back now is the script. In this case, I want to be able to find and copy duplicated values from a cell (formula cell) into another cell (link to… cell). Image 1: Here you can see the structure of the table. Column 4 (Concatenated (FORMULA)) combines the values from column 2 and 3 (Outcome 1 and 2) into one cell. I wish to identify the duplicates within cell “concatenated” and return the duplicated variables to the column cell “Duplicate” (Sample 1) (Notice that the cell “Duplicate” is formatted as “link to…” cell). IMPORTANT: IF there is more than 1 duplicate, I want to return all duplicates into cell “Duplicate”. (Sample 2) I wish to make this process automatic. Outcome 1 and 2 are results we receive automatically from an online form. Airtable automatically concatenates
I read the documentation and discovered that Airtable has a request limit for its API. We expect about 50+ people to use our mobile app on the first week of release and the number of users is probably going to increase after a month so this “5 requests per second” seems very limiting for the app. The chances of users sending requests simultaneously is pretty high and this will make the app unusable. Is there a way (maybe a premium plan) to exceed that limit without the 30 second wait penalty? Thanks!
Hi Airtable community. Since yesterday i’m facing an issue with the app I’ve been developping. I haven’t made any modification to my code and it seems to only happen since i upgraded my computer to a faster CPU (I think it’s unrelated but still mention it just in case) I have a method responsible for retrieving all the records from a table. async function getTableAsArray(baseId, tableName, view, maxRecord) { let table = [] let jsonTable = {} jsonTable['name'] = tableName jsonTable['records'] = {} base = new Airtable({ apiKey: 'API-KEY' }).base(baseId); await base(tableName).select({ maxRecords: maxRecord, view: view }).eachPage(function page(records, fetchNextPage) { // This function (`page`) will get called for each page of records. console.log(tableName) console.log(records) records.forEach(function (record, i) { if (i == 0){ console.log('1000ms') } Object.entries(record.fields).forEach(([key, value]) => {
When you are building on Airtable using Javascript - two things can help you build faster with less errors: :globe_with_meridians: GraphQL :closed_lock_with_key: . Type-safety Prisma is an amazing next generation ORM the brings type-safety and GraphQL to the table. So we wanted to see how Prisma would work with Airtable and wrote up a step-by-step tutoria: Sync Inc Docs Prisma - Sync Inc Docs Sync Inc replicates Airtable to a Postgres database, giving you the best of both worlds. In the tutorial, you’ll build a Next.js application that shows about 10K records from an Airtable base. It’s fast. And with Prisma, you can see this is just the beginning: Check it out, and would love to hear what you think.
Hi there, I am working on creating a user cms for our web app. My goal is gather a record’s information from a button click. I am currently getting the record based upon the click but I am only getting the ‘id’ and ‘name’ as part of the returned record object. Here is the code so far let table = base.getTable("Users"); let fieldsToInclude = table.fields.filter(field => field.name !== "Update User"); let record = await input.recordAsync('Update user', table, {fields: fieldsToInclude}); console.log(record, fieldsToInclude); The console output is: {id: "recmKNtwayYQNFu0K", name: "Kelly"} ▶(9) [Object, Object, Object, Object, Object, Object, Object, Object, Object] 0: Object id: "fldMqI2JmcuRkwOru" name: "First Name" description: "" type: "singleLineText" options: null isComputed: false ▶1: Object ▶2: Object ▶3: Object ▶4: Object ▶5: Object ▶6: Object 7: Object id: "fldVQSI2xjMjdunEi" name: "Initiative" description: "" type: "singleLineText" options: null isCo
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.