Need development and API help? Ask your questions here!
Recently active
Hello I need help with Airtable and Integormat. I am trying to retrieve date from a link field including multiple linked records. What I have ties is using Airtable module “Get record” in Integromatat, but I get error because the input in “Get record” receives records ID’s as it is one Record. I would appreciate If any one can offer a solution. Bellow is the photo of the error in ”Get record” module. Thank you
Hello community! This is my first Airtable script. I’ve been proud so far but there’s a detail that I cannot crack. The situation is: I’m generating a dynamic chart via quickcharts.io using Airtable fields and I want to create a .png file from it to send by email. So I created a formula field that generates the appropriate URL for the chart, this works perfectly. Then, I created a script that runs upon that URL being updated, here’s the kink. The script is based on a similar Airtable script which takes a URL and creates a file in another column on the same table. The issue is that the ´filename´ is not being updated. It creates the file perfectly, but the filename is taken as a part of the URL which is unreadable and doesn’t contain the file extension. Here’s my take: let table = base.getTable("Table 5"); let attachmentField = table.getField("Attachments") let inVar = input.config(); let url = inVar.Attachment_URL; let updates = []; let attachmentUrl = [{url: url, filename: 'Chart.pn
Hello guys, I have a field that tracks the latest payment for a user based on a checkbox. So basically every time i have a new payment, i’d like to ckeck the checkbox “payment” (if unchecked before). Otherwise, i’d like to uncheck then check it. But the following code doesn’t do any update when the checkbox was already checked. How can i make sure these two lines get executed ? let record = queryResult.getRecord(recordId[0]); //Uncheck the box if it was checked if(record.getCellValue("Payment")){ await table.updateRecordAsync(recordId[0], { "Payment": false }); } //Now recheck the box (or simply check it if it wasn't) await table.updateRecordAsync(recordId[0], { "Payment": true }); Thanks for the help !
I pull in data via CSV files (28 of them) every quarter. The “FilingID” field is always a unique number. The “DateSubmitted” field corresponds to the FilingID as the higher the number the more recent for a given Company (1B1) field. and the “IE!” field is always the same for a given company. What I am looking for is a formula or script that when a record with a higher numbered FilingID or DateSubmitted (whichever is easier) is added any record with the highest FilingID for a specific company (1B1) or (1E1) is updated to a “Current” status and any existing (older) record is changed to a “past” status.
I’m going to be keeping track of pages of items on craigstlist, facebook marketplace, etc. These items will eventually expire, and I was hoping to have a script to load the url saved in the record and return the html so I could parse something like “this post has been deleted” or a similar css or html element. I tried fetch, which seems to give an error because of CORS. I also tried remoteFetchAsync which will only return “function” no matter my settings. There are no APIs available for these sites, at least craigslist. Here is the code that returns “function”. Any ideas appreciated thanks! const getResults = await remoteFetchAsync('https://tampa.craigslist.org/hil/cto/d/land-lakes-2016-chevrolet-cruze-limited/7337285063.html'); console.log(await getResults.text);
Hi there, I’m trying to adapt the “Create records from multiple select” script in the marketplace to instead create records based on a lookup field. The issue seems to be that choices is not an option of a lookup field, just the multiple select field the script was designed for. Is it a dead end trying to adapt this? Or is it possible to go deeper into the lookup field to check that the field in the original table is a multiple select field and therefore has a choices option? TIA!
Hello, I’m trying to figure out a way to use the API to get all records modified TODAY(). When I retrieve records with the API I can see the createdTime field, but no modifiedTime field though the documentation says it exists. Does anyone know of a formula that I can use to get all records modified TODAY()? Thanks!
I’ve been playing around with the scripting block, while learning Java script. I’m trying to make a script to generate pivot tables. I’m a little stock on understanding why my output.table(tableArray) in below code doesn’t make a nice table similar to my test table? Anyone that can see from my output what I’m doing wrong? const table = base.getTable('report'); let queryResult = await table.selectRecordsAsync(); output.inspect(queryResult); //Row names let nameArray = [] for (let record of queryResult.records){ //nameArray.push(record.name) nameArray.push(record.getCellValue('Select Name')[0].name) }; const uniqueNames = [...new Set(nameArray)]; output.inspect(uniqueNames); //Coloumn names let itemsArray = [] for (let record of queryResult.records){ itemsArray.push(record.getCellValue('Working on')) } const uniqueItems = [...new Set(itemsArray)] output.inspect(uniqueItems); //Make Rows let tableArray = []; for(let i=0; i<uniqueNames.length; i++ ){ let categories
Resurfacing the discussion from Reload app on useRecordActionData hook since it was never really solved. I have the same issue. I’ve tried useEffect() and useState() to store and update the state, but Airtable’s button action appears to generate recordActionData one time. So, in my case, I can get the record data, create a new record on a separate table and attach it to the original record via a linked record field, and expand the new record for editing, and I report back to the user with a message indicating the name of the newly created record. That all works, but the app itself just stays on that final display state, saying the name of the new record. When the user hits the button again, nothing happens. No new recordActionData is sent, so the app’s useEffect function is not triggered again. Here’s the bulk of my working code: function SourceTrackerApp() { const recordActionData = useRecordActionData(); if (recordActionData === null) { return <Box padding={2}
We are hitting the Airtable API from a server located in China. The API calls go through, anyways, we are having issues downloading the attached files located at dl.airtable.com/.... Most of the requests are failing. Is there a way to get around these issues? Maybe accessing an other CDN? Best, Sebastian
Node is unavailable on the server we’re using. So, is there another way to hide the API key using either Vanilla JS or PHP? Thanks!
I am not a skilled in Java script and am struggling with the simplest of a problem. Any help to get me going would be appriciated. Example: // Trying to change content of “Test Field” in an existing record to “Paused” // through a button function in that record. let table = base.getTable(‘ACC Base’); //Test Field is a Single Select Field let field = table.getField(‘Test Field’); let value = “Paused”; // When run from a button field, the script skips the prompt // and automatically uses the button’s record. let record = await input.recordAsync(‘Choose a record’, table); await table.updateRecordAsync(record, {‘Test Field’: “Paused”}); //End
I thought I was getting the hang of this Airtable thing, but I’m stuck on this problem. I’m trying to separate multiple columns from a single row into multiple rows in another table: Airtable Safety Audits - Airtable Explore the "Safety Audits" base on Airtable. Single audits are conducted using the fields in the ‘Safety Audits’ table. In the example there are 3 questions (Q1-3). If the answer to these is ‘NO’, the user is asked if the need to ‘Report A Fault’ (YES/NO). If yes, then they enter the details (Location, subject, photo, etc.). I think I need a script to populate table ‘All Faults’? Any assistance would be greatly appreciated as I have exhausted all of my formula knowledge. I appreciate this seems quite long winded, but the audit questions are part of our compliance records, so each question needs answered (the real audit has about 12 questions). The faults are a bi-product of the audits, and need to be treated separatel
How do I test for an empty Message field when it’s a “Long text” type? This code does not work… let strReplyStatus = ''; if (rsReply.getCellValue('Message') === '') { strReplyStatus = 'Empty'; }; if (rsReply.getCellValue('Message') == '') { strReplyStatus = 'Empty'; };
Trying to update additional fields of an updated record accordingly. Getting “undefined” value for recordId. What would be the problem? let recordId = input.config().recordId; console.log(recordId); let rootTable = base.getTable('uretim-kaydi'); let rootQuery = await rootTable.selectRecordsAsync(); let record = rootQuery.getRecord(recordId);
Is there a way to create a new record and enter a RECORD ID inside of a linked column? I’d like to reference the ID of other tables in my new entry, but am getting this error: According to AirTable’s documentation: “Airtable API performs automatic data conversion from string values if typecast parameter is passed in. Automatic conversion is disabled by default to ensure data integrity, but it may be helpful for integrating with 3rd party data sources.” Will enabling this feature solve the problem?
Hi! Currently I am developing dashboards for customers. The apps/chart will be displayed on a wordpress page using html code generated by Airtable “share”-function. Currently the interaction function prevents me from doing this. I don’t want the customer to be able to see all the records when they click on the chart. Conclusion: I only want to show the graph and not the underlying data. How can I do that?
Hello! I am writing a script that will export all the data from a database into Json files. With the API, I can easily get the column’s name and their values, but can’t get the table’s name! For instance, I have a table named “People” with its attribute: name, address, age, etc… I can get the attributes… but I want to get “People”. So I wrote manually in the script their names, but it’s not very convenient as if, in the future, new tables will be created. Is there any call I can do with the API? A “get” function or do something with the value of the records received? I work with node. Thank you and have a nice day everyone!
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
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.