Need development and API help? Ask your questions here!
Recently active
I am trying to do a curl command where I filter results from a linked table that has multiple linked records… I have the record ID for the linked table record. Tried some encoded filterbyformula variations but get zero results. linked field name is “sections”. I tried this most recently: filterByFormula=FIND(%22rec0nTsg5N5p1i5Pv%22%2C+%7Bsections%7D) Thanks for help.
Hello! My goal would be to automatically add photos from Table 2 (where they are imported in bulk) to Table 1 (with the right item order). The only link between the items in the two tables is a code/name column. I tried my best experimenting with formulas in Airtable and GSheet, but I couldn’t find any solution. I copied a script from an older community topic: Programmatically copy images from one table to another , but it doesn’t seem to work. Can someone please help figure out what the problem might be, or offer another solution? Here’s a simple version of my base (Restaurant): https://airtable.com/invite/l?inviteId=invyOwrzT6i00qbss&inviteToken=1c708dfb92651fb230f375f758d4d172ad56602b0347fccf8ac86f495d5a8522 , where the pasta dishes (Menu Item Name) should get the photos in the Attachments column from the Image column in Table 2, connected by the Name and Code columns. Thank you!
I am trying to duplicate a row from one table to another (using scripts). The table I am copying from has a column with “rating” type field in it. How do I go about duplicating in the createRecordAsync script? I tried something like let table1 = base.getTable("Table1"); let table2 = base.getTable("Table2"); let table1Rec = await table1.selectRecordsAsync(); await table2.createRecordAsync({ "Memo":[{icon: "star",max:table1Rec.getCellValue("Memo"),color:"yellow"}] } I got an error. Summarizing it: “(property) “Memo”?: 0 | 1 | 2 | 3 | 4 | 5 Type ‘{ icon: string; max: number; color: string; }’ is not assignable to type ‘0 | 1 | 2 | 3 | 4 | 5’. Type ‘{ icon: string; max: number; color: string; }’ is not assignable to type ‘5’.(2322)”
I am using Airtable as the backend for my hiring assessment app (a cybersecurity hiring test). As I understand it, Airtable’s API uses bearer authentication. I’m trying to integrate my app with Greenhouse.io, an applicant tracking system. Greenhouse’s API uses basic authentication. The way it works is this: Our customer, which uses Greenhouse to manage its hiring process, gets a list of tests (assessments) from us with a GET call. Customer chooses which test they’d like a particular candidate to take, and gives us the details with a POST call. We send the test to the candidate. We let the customer know when the assessment is complete with a PATCH call. Customer gets the assessment results from us using a GET call. Is there a no code/low code way for me to integrate with the Greenhouse API even though they use a different authentication method?
I’m trying to create my first app with the functionality to copy records from 1 table to another. I have been following examples here on the Record Picker and Spreadsheet importer: Airtable Scripting I run into the error: /Users/dev/.nvm/versions/node/v14.15.0/lib/node_modules/@airtable/blocks-cli/transpiled/src/builder/frontend/index.js: 'await' is only allowed within async functions (9:15) If I remove await commands, then I run into: ReferenceError: base is not defined at HelloWorldApp (https://localhost:9000/__runFrame/bundle.js:59:21) at renderWithHooks (https://localhost:9000/__runFrame/bundle.js:59844:18) at mountIndeterminateComponent (https://localhost:9000/__runFrame/bundle.js:62524:13) at beginWork (https://localhost:9000/__runFrame/bundle.js:63648:16) at HTMLUnknownElement.callCallback (https://localhost:9000/__runFrame/bundle.js:45207:14) at HTMLUnknownElement.e._wrapped (https://cdnjs.cloudflare.com/ajax/libs/rollbar.js/1.9.0/rollbar.nojson.min.js:1:13806) at Object.invoke
Hi, I want to allow a customer of mine to export the data on AirTable. I figured that if the customer put the API key, my program can do the rest, specifically: create a table with specific fields put the data in As far as I understood point 2 is easy but point 1 is impossible with current set of API. Is that true? PS: I noticed that there is a way to create a table using the Airtable Blocks API but is that only for frontend apps? Or can I work with them on a NodeJS instance?
We are trying to access a specific cell value in the code. We are able to query the records and getCellValueAsString. However when we try to call a specific record from a field we get a completely different record from that field and there seems to be no pattern to it. let table = base.getTable("🌻 Groups"); let queryResult = await table.selectRecordsAsync(); let record = queryResult.records[1]; console.log(record.getCellValueAsString("This Record 🆔")); console.log(record);`Preformatted text` As you can see we are trying to get the first record in the list, but we actual get the 27th and if we increment the value to the second, we may end up getting the 35th record. However all of the fields within the row that is selected is present. The reason we want to do it is because we want to update a linked record to a cell while leaving the previously linked records intact.
Hello, I use this script for move record from table 1 to table 2, All data is moved except data of type dropdown list (Ville). I show this error: Can’t create records: invalid cell value for field ‘Ville’. Could not find a choice with that ID or name let table1 = base.getTable("DATA"); let table2 = base.getTable("Con"); let result = await table1.selectRecordsAsync(); for (let record of result.records) { if (record.getCellValue("Prét")) { await table2.createRecordsAsync([ { fields: { 'ID': record.getCellValue("ID"), 'Source': record.getCellValue("Source"), 'Agent': record.getCellValue("Agent"), 'Nom complet': record.getCellValue("Nom complet"), 'Téléphone': record.getCellValue("Téléphone"), 'Ville': record.getCellValue("Ville"), 'Prét': record.getCellValue("Prét") }, } ]);
Is there a way to reset an input field? Say someone pulls up a record selection input and then they click off so nothing is selected the user is no longer able to go back and select something different. As far as I know you can’t reset the input, remove the element and re-add it to let the user try again. I tried using a do while loop so that it could do the input instruction again if the variable is null. If it isn’t possible to reset the input or remove the element and re-add another input, is there a way to re-run the script with a button or some other event?
Hi I create new records in Airtable via the API with integromat. As part of the payload I send a id which is numerical, however when I receive the response back from airtable, the id is displayed as alphanumeric. The same happens when I send an api request for records, the id is also displayed as alphanumeric - I have to see the id as a number Please assist Thanks Jaco
Hi guys, I am just starting with the scripting and I am really trying my best. I have learned a lot just by trying out different submissions from the community and by doing that I understand how a script is structured etc. I am currently focused on 3 specific scripts that was contributed to this community. The first one is automatically setting up a field from a table to link all records from a view based on another table. It worked. let mstTable = base.getTable('$MST'); let mstView = base.getTable('$MST').getView('TEST'); let mstQuery = await mstView.selectRecordsAsync(); let mstRecords = mstQuery.records; let invsumTable = base.getTable('$INV: SUM'); let invsumQuery = await invsumTable.selectRecordsAsync(); let invsumRecords = invsumQuery.records; let d = [] invsumRecords.forEach(c => d.push({id: [c.id](http://c.id/)})); let updateRecords = mstRecords.map(c=> ({id:c.id,fields:{'$INV: SUM': d}})); while (updateRecords.length > 0) { await mstTable.updateRecordsAsync(updateR
I get to the Blocks install step and receive this error(I am using a mac OS with the npm V14). I was uncertain if there was a configuration or setting that I missed. Initializing block using https://github.com/Airtable/apps-hello-world template … :x: Something failed! Cleaning up… :x: Error: TAR_BAD_ARCHIVE: Unrecognized archive format
Hi there, we run our school’s school information system (SIS) on Airtable. Our faculty and staff have a daily schedule that is fairly consistent from workweek to workweek, but does include some variation. I want to the ability to copy a week’s worth of events from one week to the next, at which point I can make micro adjustments where needed. It’s far too cumbersome to individually copy every event, every day, and then adjust both the start and end (time) fields on every single record. I assume a scripting solution here is the right direction to head, but, being very new to this feature, I wonder if others with more experience would agree. In essence, i’m attempting to mimic the features of some of the most popular employee-scheduling apps (e.g. Sling — getsling.com/employee-scheduling). My setup is essentially this: Table called “Calendar” Date and time field called “Start” Date and time field called “End” Several other fields specific to our organization Grid view Calendar view For
Can a script link a record in TABLE A to the matching records (via email addresses) in multiple tables TABLE B, TABLE C, TABLE D, etc in one go or does each one have to be its own scripting app? Thanks!
Hi there :slightly_smiling_face: I want to copy certain fields of a record to another table. Example: table 1 has 3 fields with names: 1,2,3 table 2 has 4 fields with names: 1,3,4,5 When the script is run, all records of table 1 should be copied to table 2 into fields 1 and 3 (leaving fields 4 and 5 empty). Could you give me some direction as to what should go into the bold section? What I have so far: let table1 = base.getTable(‘Table 1’); let table2 = base.getTable(‘Table 2’); let copyQuery = await table1.selectRecordsAsync(); for (let record of copyQuery.records){ table2.createRecordsAsync([ { //what should be here } ]); };
I see in another post that it’s possible to create tables and fields via Apps (aka blocks). However, it’s not possible to create Formula, Link, Rollup, Lookup, and Filter fields. This would really be helpful to my use case. For example, I have a base that manages my finances. A few of the columns have formulas and rollups that are filtered for only including December transactions. When January comes, I would want to click a button that either creates these same columns filtered for January transactions or updates the previous columns.
I’m trying to do the following: filter records in the table by a cell number AND by whether a cell says “voicemail” or “text message” - so I want to find records that match the cell number and where the VMorText cell is “text message”. Cell type is computed (problem 1) After that - find the record that was created first in the resulting array (problem 2) Part of the script below // getting ID for new record let config = input.config(); let TxtrecordID = config.TxtRecordID; let Txtcellnumber = config.TxtCellnumber; // get cell number let Txtsearchfield = await Txttable.getField('Cell number'); // define search area as Ticket table let Txtsearcharea = await Txttable.selectRecordsAsync() // list records that match cell number - problem 1 let matchingTxtRecords = Txtsearcharea.records.filter(cellnumber => { return cellnumber.getCellValueAsString(Txtsearchfield).includes(config.TxtCellnumber) }) // try to select first record from array - problem 2 let firstTxtrecord = matchingTxtR
Hello, I’m developing an Airtable App and I want to access to linked records of a given record. When looking into the API doc the only way documented is using useRecords like following: const linkedTable = base.getTableByName("table1"); const linkedRecords = useRecords( record.selectLinkedRecordsFromCell("table1", { // Keep the linked records sorted by their primary field. sorts: [{ field: linkedTable.primaryField, direction: "asc" }], }) ); the issue is that I’m trying to do some logic in a non React coponent in a “Service” class, so I can’t use useRecords… In the API docs they are talking about loading data, I tried loading data manually like so: const table1QueryResult = await table1.selectRecords(); await table1QueryResult.loadDataAsync(); recordToMatch.selectLinkedRecordsFromCell("table1") but I always get an error: Error: LinkedRecordsQueryResult data is not loaded at LinkedRecordsQueryResult.get Thank you,
MacOS Mojave 10.14.5 (18F132) airtable/blocks: 1.0.0 Browser: Chrome <Button marginRight={2} variant="secondary" icon="download"> <Button marginRight={2} variant="secondary" icon="upload"> Displays as: The icons look a bit messed up to me. They work okay as standalone <Icon/>s. @somehats tagging you again after you helped out last time - let me know if I shouldn’t though!
Hi all, For custom apps what is the recommendation for storing large amounts of data? For example: If I was building Page Designer, where would I store the whole page designed by the user? Thanks!!
I am trying to, with scripting, link multiple records to one record. The code I have below succesfully links one record, and I’ve tried using a for loop, as well as a forEach to get it to cycle through the record Ids in the ‘matchTKRecords’ array. I’ve attached a picture of the console.log output for the matchingTKRecords array. To clarify - my aim is to link the VMrecordID record to any/all of the records in matchingTKrecords The error I get is always some variation on: Error: Field "Linked tickets" cannot accept the provided value. at main on line 46 what I don’t understand is why an array of record IDs is not accepted as a write value for a linked tickets field (it is set-up correctly as a ‘link to another record’ field). Linking to multiple records is enabled let newForeignRecordIdToLink = matchingTKRecords[0].id; VMtable.updateRecordAsync(config.VMrecordID, { 'Linked tickets': [{ id: newForeignRecordIdToLink }] }) Thank you in advance for any assistance!
Does anyone know how to delete a record that has the same criteria (person_id + project_id) as a newly added record? Within our organization we have a table in which people give their estimate of hours per project. They fill this out via a form. Now they have to give an update as soon as they see a change coming. I am looking for a script code that will compare the fields (person_id and project_id) as soon as a new record is added and remove the old record if there is one and then add the new record. And if it is not there, then the record is simply added. Does anybody know how to program this in a script? Thanks in advance :pray: Robert
One thing I find is an issue with Zapier is how it fails to refresh the test data while I am creating the zap workflow. If I am going through the process of setting up the zap and the Airtable table doesn’t have any appropriate data in it (…it usually happens if I miss to add some data in the table or it’s not in a view it should be…) then Zapier will not show the Airtable fields as existing (in the action step). I would rather prefer if it would show the fields whether it has some test data or not. That wouldn’t be such an issue, I can go and fill in some data. BUT the issue is even after adding that information into Airtable (and refreshing zap or even reloading it), the newly added fields are still not showing up in the zap action step and it can take sometime or maybe an hour or so for them to show up. It’s strange, it looks like zap is cashing the airtable configuration or something and it doesn’t replace with fresh Artable data immediately. And that happens even if I select the n
Hey Community, I was getting help a little while ago on a script a month ago, and I’m trying to apply the old script to a new use case, and having a bit of a problem. I’m having another issue upstream through an integration that is removing the file name. This problem is a bug that doesn’t look like it’ll be fixed in the short term, so I thought if I reuse a name script I’ve been using, it should solve my problem. The only issue with the script is in the current version it was built to maintain the extension, IE: PDF, MOV, MP4, etc… but I want to completely rename the file via the field I have on my database. When I’m using this right now, it’s for some reason adding the name of the file at the end of it when the name changes… I’ve spent nearly 1.5 hours trying to solve this in different ways, but can’t figure it out. Does anyone who is better with scripts know how to change this? This is what it is currently giving me, and I don’t want the weird stuff at the end… I want it to end at .
I spent a lot of time learning this integration using native Wix Code. So I’ve created a Udemy course at https://www.udemy.com/course/integrating-airtable-and-other-3rd-party-api-data-into-wix/learn/lecture/22005838#overview that shows you how to integrate Wix and Airtable with no 3rd party middleware in between. The code uses the Wix FETCH function to call the Airtable API. It’s tricky because Airtable paginates the data to only return 100 records at a time. So my code uses the Airtable offset to loop through the data (very quickly) in batches of 100. I use it on my own site. The cost of the course is $30. The code is provided on the example website that comes with the course…but you need to pay the $30 for the course to get the password for the code page… The course is for beginner level coders or people who have never used Wix Corvid before so it covers off all the basics…
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.