Need development and API help? Ask your questions here!
Recently active
Hello, I’m using pory.io and I tried to implament a “like” system in my table - a button with script that when pressed it increments "“likes” col in the row it has been pressed. But when using the button in pory.io it sends me to the table and opens the row details. The code: const config = input.config({ title: 'Add 1 to a number field', description: 'A script that lets you increment a number', items: [ input.config.table('table', { label: 'Idea Table', }), input.config.field('numberField', { label: 'Likes', parentTable: 'table', }), ] }); const record = await input.recordAsync("Pick a record", config.table) const currentNumber = record.getCellValue('Likes'); const newNumber = currentNumber ? currentNumber + 1 : 1 await config.table.updateRecordAsync(record, { [config.numberField.name]: newNumber }) output.markdown(`Updated ${config.numberField.name} for ${record.name} to ${newNumber}`)
Hello everyone! I am trying to get an array of unique items which are objects of two keys {id: "record ID", name: "name of record"} To filter out duplicate items I use rather complicated way. I define 3 arrays: one for keeping collected data possibly having duplicates and later for cleaned data two others for keeping filtered ids and names Code looks like this: let d = []; let u = []; let v = []; d = [{id:1, name:"a"},{id:3, name:"b"},{id:3, name:"b"}]; console.log(d); u = [...new Set(d.map(d => d.id))]; v = [...new Set(d.map(d => d.name))]; d = []; let m = 0; while (m < u.length){ d[m] = {id:u[m],name:v[m]}; m++ } console.log(d); As you can see I am using a Set to filter out duplicates. Unfortunately, this works only for simpler arrays (or I do not know how to use it in my case). Is there any easier or brief way to do that? Any valuable suggestion is much appreciated.
I have a view that is being grouped by two fields. When I do myView.selectRecordsAsync(); I get a flat list of records, though. Do I have to redo the grouping in JavaScript or is there a way for this to return a nested list that’s the same structure as my grouped view?
I wanted to know whether we can get the record which fulfills a particular condition in JavaScript (backend) or basically node.js and if yes then how? I want to use it to retrieve some user data.
Hello all, I’m working with a dataset where a user has permission to access multiple accounts, and an account can be accessed by multiple users (there is a many-to-many relationship between users and accounts). I’m importing this dataset into Airtable as a CSV file via a script that does two things: If an account in the dataset does not already have a record in the Accounts table in Airtable, it creates one If an account in the dataset already has a record in the Accounts table in Airtable, but the User field (a linked record field that allows linking to multiple records) does not contain a link to a linked record for a specific user (set in a variable elsewhere in the script), then it adds that user to the User field The issue that I’m running into is that after doing a lot of searching I’m not sure how to correctly write the following actions into my script: Filter records on the Accounts table where the User field (a linked record field that allows linking to multiple record
I have a view that has over 200 records enter on a specific date around 10 AM. This view is used to trigger Zapier to send a sendgrid email template. The issue is that Zapier will only get the oldest 200 records (which are all updated via csv import every morning) so anything over 200 won’t trigger. Because there is a large volume of records all triggered at once, Zapier holds them, so I can’t use the update record step after the sendgrid step to clean them out of the view as they run to ensure I get through the whole list. Anyone know a workaround (other than switching to integromat)? Any help is greatly appreciated. Have a send scheduled for Monday - hoping to figure this out this weekend.
Hello everyone, Now this is a strange one: I obtain a date object from an entry by a user, then I use that date to fill in a cell in a new record… output.text(HandoverDate is ${handOverDate}); let table2 = base.getTable(“Timeline”); let recordIds = await table2.createRecordsAsync([ { fields: { “Start date”: handOverDate, “Project”: [{ id: projectsDict[projectName].id }], “Milestone”: { name: ‘Launch’ }, “Task start date”: launchDate, “Task End date”: launchDate }, }, … The output text shows the actual date inserted by the user (it is processed a bit earlier in the code)… but the value in the ‘Start Date’ column is exactly one day earlier… I have also tried different dates and the behaviour is consistent (across months, etc…). I want to add that this portion of code is as is: I haven’t hidden any lines for this post. Any suggestions?
Good morning, i have a problem with my script. I want to update a record from a script button and i write this code: // Delete a record let table = base.getTable("Clients"); let record = input.recordAsync; table.updateRecordAsync(record, {'Name': 'Update'}); This doesn’t work and i don’t understand why. The only message i get is This script did not use the record from the button field. To use a record from a button field, call input.recordAsync in your script Anyone can help me please?
I’m trying to use Tailwind CSS with Airtable, but I’m not quite sure how to properly integrate the CSS. For context, I’m an experienced backend developer but my frontend experience consists of simple HTML and building simple React components. I know little about different frontend build systems. I know that it’s possible to import Tailwind from the CDN, but my understanding is that requires an HTML view to add the <a> tag that handles the import. Since Airtable doesn’t expose the HTML, I’m unsure if that is possible. Does anyone know of a very simple guide that walks through creating an Airtable app with Tailwind (or any custom CSS), bundling/building it if necessary, and uploading it to Airtable?
Hey everyone, I am new to airtable scripting and try to update records in a multiple select field (Users) the same way I do in a single select field (Workstation). It works in the singleselect but for the multipleselect I get the following error message: "j: Error: Failed schema validation: must be an array at main on line 19" As far as I can tell the root as well as my value are both arrays. Also the multiple select field appears to be in readonly and I cant figure out why. Here is my code. I really appreciate some help. Thank in advance. let table = base.getTable("Bookings - FoxOMS"); let query = await table.selectRecordsAsync({fields:["Location"]}); var myString = new String(); var myStringArray = new Array(); for (let record of query.records) { myString = record.getCellValueAsString("Location"); myStringArray = myString.split(","); if(!myStringArray[0].includes("Edit")){ myStringArray.unshift("No Workstation selected"); } await table.updateRecordAsync(record.id, {“Wo
I don’t see anything in the Developer docs for Apps or Scripts which has the option of setting a table’s or field’s permissions. There are methods to see if the table or user has permissions to make changes, but none to set them through the API as far as I can tell. Use case: I have created an archive of a large base with many tables for posterity prior to deleting a bunch of data. I’d feel better with the archive copy locked down to prevent any modifications. It would be great to be able to for-loop through the table’s and fields to lock them down in order to prevent record deletion, new record creation, and modification. Is there a way to do this programmatically or only through the GUI?
I’m trying to purge a KeyCDN url in a script and get the following error, “Request cannot be constructed from a URL that includes credentials”.
It’d be great if there was a required?: boolean field on the <Label>, <FormField> components in the apps sdk. When set to true, this would add a red asterisk like the one seen here:
Hi guys :slightly_smiling_face: Happy Friday! I was trying to adapt one of the available scripts. However, I failed badly. Opposite to the script I shared above, I’m using only two tables and in the main, I don’t want to create a template but I want to take a record (only a product name field) from the first table and incorporate it into the second table and assignee this record to a specific client (for that column, I’m using a single select feature). Those two tables are linked to each other by the product name column. In other words, the first table is containing all our products, while the second table contains multiply of these duplicated records but each of these records is assigned to a different client. Each client’s view is tailored and depending on their profile we share only products that are relevant to their profile. As our list of partners is growing, this task is becoming time-consuming as each time we need to perform it manually but with the sort of semi-automation, w
Currently my business is subscription based all through my company’s app with the database set up in Airtable (with payments in Stripe). I would like to add the ability to purchase a subscription from the website as well, and have it connected to the current Airtable database. Is this a doable task for a beginner or better suited for a developer? Thanks Brad
Airtable forms are not sufficient for my client’s need. There are several complex editable PDFs which they need populated from Airtable bases, but the scripting app questioningly denies access to the DOM (which is at least documented), but also the BOM (not documented). I can successfully populate the PDFs, but I can’t do anything with the stream. It would be great if I could open a browser window and dump it there, but without BOM access that is not doable. Any ideas to get around this report generation miss that Airtable has?
Hi all, I have built a simple email automation for our team that triggers upon entering a view. All good there. However, we have one text block in the email that is dependent on the value in a specific field. I have done some digging, and it seems like there should be a way to make this text block appear conditionally, but I am not sure where to begin. I am more familiar with formulas than scripts, but I am guessing an script with an if/then function could work, with something like "If (field X is empty then, " ", “text block”), where I would use the output of the script in the email. Can anyone point me in the right direction, and to where I might find the bones of such a script if this seems workable? Thanks
We have an airtable form that we are embedding into our website via an iframe. Our form is very long and after they submit it we run into weird behavior. Submit a very long form webpage remains the height of the form submission message is centered within that height screen appears to be blank (causing confusion wether the form has been properly submitted) Scroll up you will see the after submission message. Why does the height of the webpage stay the same after the form is submitted? It is causing the message to be “hidden” from view and causing confusion.
Hi! I’ve been wanting to use an map in my database, in a way that it plots every record within my database. However, airtable’s map app requires use to use google API which would be very costly, and I have other ways of getting geocode coordinates of each location. Is there any map solution within airtable that will be fed lat/long and plot it in a map?
Here’s an odd one random records go blank after being created 40 out of around 600 entries. Here’s the kicker it thinks the content is there. Can’t add the linked item because it thinks it is already linked. Add in the OS, the history shows no change just the original entry by the API. Also, could sort by the supposedly blank records
This is killing me. It’s literally the last speedbump in my first Airtable script: I have this command: await email.updateRecordAsync(dateArray[i][0],{‘ActualFieldName’ : linkID}); It works! But THIS… await email.updateRecordAsync(dateArray[i][0],{fieldVar : linkID}); DOESN’T WORK. Even with the single-quotes gone, the system is still parsing my defined and assigned fieldVar as the string “fieldVar”. It’s maddening. Any ideas?
I am new to the scripting platform and what im trying to create is a button that will trigger a script that does the following things. Look at Table - I got this working Look at View - Got this working Results of all Records - i think i have this working via await view.selectrecordsAsync(); Run Loop for ‘X’ number of times. Inside this loop i want to update a specific field (for instance Checking a checkbox) So basically i want to click the button, it goes to a certain view within a table and updates a field of about 100 records, then it will stop.
This hook works well when changing between tables and when deleting a table but not when creating a new table. Example: const cursor = useCursor(); When I create a new table cursor.activeTableId is null and the property is only set moments later. Any solution from the SDK to handle this specific case? Or should I implement some internal logic to wait for this property to be defined?
Hey everyone, been using integromat and trying to find records in Airtable. Is there an option to search for a record using 2 conditions? I want to find the record that has the following 2 conditions (see attached image)
Let’s say I have a table with few rows - each one has a uniq ID Can a button cell have a script that will identify the ID in which he was called? for example - this is my table: id. Button 1 Click 2 Click when I click on the button on the first row - I can see what is also the id of this row.
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.