Need development and API help? Ask your questions here!
Recently active
Hi, I would like to see an integration with Microsoft Teams. As this is our preferred CMS at work.
Hello. Nice to mee you. I have this probrem.Preformatted text please let me know. //get table info let table = base.getTable("A2_複製"); let queryResult = await table.selectRecordsAsync(); let record; let stocks = new Array(2); //I wanna set to array[i][0~1], but I can't... Error tell me "TypeError: Cannot read property '0' of undefined" for(let i = 0; i < queryResult.records.length; i++){ record = queryResult.records[i]; stocks[i][0].push(record.id); stocks[i][1].push(record.getCellValue("*印刷型番")); } ; console.log(stocks);
Is there a way to delete tables in a base programatically ? The blocks API does allow creation of tables, the destroy although works via the REST API when called with the cookies Will there be a base.DeleteTableAsync ? or can we use sessions in some way to get the cookie and make the REST API call, still have to explore on sessions
Hello, I use Airtable to organize the list of traditional folk tunes I play on my fiddle. As well as the typical tune metadata (name, style, key, composer, etc.), I paste in a PNG of the music score and a “snippet” of the first couple bars. I’d like to instead have the music rendered in a cell using abcjs that references another cell that has the raw abc music notation. Looking at library documentation, seems like this should be an easy thing to do(?), but I’m not much of a programmer. Does anyone want to take a stab at this “for fun”? :grimacing: I’d appreciate any tips to get me started; I’m eager to improve my coding skills and could use this project as a vehicle. Thanks! Tom
I’m guessing if it was possible it would have something to do with using typescript but I have not been able to figure it out. I did download node and tried to install the airtable npm but kept getting a “connect EBADF” error. Not sure if any of this is actually gets me closer to my desired goal but this was just me attempting things.
How can I test changes to a base, and then deploy them to a live environment? I’m building a fairly complex base for a client. Once the project is live, there’ll doubtless be a need for further enhancements, bug fixes, etc. I need to be able to test those changes safely, and then once proven, deploy them to the live base. I can’t see any way Airtable handles this right now - the only option I can see is to manually note all the things that I’ve changed in the test base, and then repeat those changes on the production system, while it’s live. Any suggestions?? Am I crazy trying to use Airtable for a production system?
I would like to know if it is possible to trigger script when a record is updated. I can see the [ useWatchable ](Airtable Blocks SDK) hook is avaiable, but I don’t know if it will run on background or not? For example If I update record using a API then would it would trigger ? Here is what I want to achieve :slightly_smiling_face: When a record is updated in a table ==> Trigger APP to run calculation ==> ADD/update entry in another table. For first table there are number of source to update record… Please advise if thre is an better optoon available.
Hello! The API seems to not return the profilePicUrl on the Collaborator field, even doe the collaborator has a profile picture. Does anyone have the same problem?
I’m a developer and plan on writing A LOT of different scripts. Let’s say I create a script that sums the values of a column. I plan on using this script (function) in multiple scripts. Is there a way I can essentially call this script in separate scripts instead of having to copy and paste code all the time? In other words, can I create global functions? Can I call a script in another script? The same concept applies to global variables. My script will use the name of one of my columns. But if I change the column name, my script won’t work. I have to manually edit the script and change the column name. Global variables, or at least global to the table (doesn’t have to be the entire base), would enable the script to update automatically.
I’m not a programmer, I’m trying to update a record based on the conditions selected. I’m battling to understand the ‘await’ function. I believe it’s a promise and that it splits the code until the conditions are fulfilled? I kept getting an error if I put the await inside the if conditions. I’ve re-written this a few hundred times and tried looking up what other people have done and now I’m throwing in the towel. Below is the full script, any guidance would be hugely appreciated. // Change this name to use a different table let table = base.getTable("Game Tracker"); // Prompt the user to pick a record // If this script is run from a button field, this will use the button's record instead. let record = await input.recordAsync('Select a record to use', table); let seats = record.getCellValue("Employees"); let segmentSize; await table.updateRecordAsync(record, {"Segment": segmentSize}) if(seats) { if(seats > 300) { segmentSize = "Enterprise"; } else if (sea
I am attempting to write multiple linked field values to a sigle new record. When I invoke the createRecordAsync method on the table, more than ten records (all with the same cell values) get written to the table. When I define the function as Async and use an await, no records end up getting created. Code snippets below. let operatorNamesField=tableOperators.getFieldByNameIfExists('Operator Names'); let operatorNamesRecord=useRecords(tableOperators, operatorNamesField); let operatorNameOptions=operatorNamesRecord.map(operatorNamesRecord=>({ label: operatorNamesRecord.getCellValueAsString(operatorNamesField), value: operatorNamesRecord.id })); //note: all of the select field options are formatted as above, but not shown for brevity <Select value={machineId} options={machineNameOptions} onChange={setMachineId} /> <Select
Hello, Is any of you guys familiar with the new native script url to attachement ? It is looking pretty good, working really smoothly. But it seems to have a cache issue : the image captured is the same throughout the day. Do you know how long the cache is preventing a fresh image to be attached ? Does anyone knows how to edit the script in order to have a fresh new image everytime ? Thanksfor your help. Hereafter the script code : let settings = input.config({ title: "Convert URLs to attachments", description: `This script will download all attachments from a URL into an attachment field. The source field can be a URL field or any text field containing a URL. Each cell should only contain a single URL.`, items: [ input.config.table("table", { label: "Table" }), input.config.field("urlField", { parentTable: "table", label: "URL field", }), input.config.field("attachmentField", { parentTable: "table", label: "Attachment field",
Is it possible to access a base outside of a base in which an app is installed? That is, if my application is integrated in one base, can it use something similar to the useBase hook on outside bases to which I have access?
hello, i am fetching data from table and prefer to filter them before displaying, to do like operator WHERE in SQL, how can i do this with airtable?
Hi I need your help today. I would like write a script to update à LinkToFild with multiple Record Links. I write this script but “await tableLudique.updateRecordAsync” doesn’t work. Can you help me ? let inputConfig = input.config(); let rentedgames = inputConfig.listingrent; let proposedgames = inputConfig.listingpropose; let tableLudique = base.getTable("Profil Ludique"); let recordsPulpo = await base.getTable("Liste jeux de PulpoLudo").selectRecordsAsync(); let record = inputConfig.record; console.log(proposedgames); console.log(rentedgames); for (let rentedgame of rentedgames) { for (let proposedgame of proposedgames) { if (proposedgame == recordsPulpo.getRecord(rentedgame).getCellValue("Référence")[0].id) { proposedgames.splice(proposedgames.indexOf(proposedgame), 1); }; }; }; console.log(proposedgames); console.log(rentedgames); await tableLudique.updateRecordAsync(record, { "liste des jeux à proposer": proposedgames, }); Thanks for
I created a table that has cells with email templates I want to send. The email templates in specific cells have tags that reference specific records I have chosen. I am trying to pass the email templates to an If Then statement in a script but the output it puts is with the tags instead of the record information. Below you can see the script, followed by the output, followed by the output I want. Do you have any idea how to fix this? SCRIPT // Change this name to use a different table let deals = base.getTable(“Deals”); let templates = base.getTable(“Templates”); // Prompt the user to pick a record from deals then from templates // If this script is run from a button field, this will use the button’s record instead. output.text(“Templates matched with Records”) let record = await input.recordAsync(‘Select a record to use’, deals); let temp = await input.recordAsync(‘Select a template to use’, templates); // You can use temp.getCellValue("Field name") to access the template var select
Hi, I am currently connecting to airtable data via the API. I am able to sort my response in certain fields using desc and asc. However for non text fields in particular single select fields where in the UI you would sort First-Last. What would the parameter be for sorting these fields?
Part of my custom APP takes a number of different user inputs from a UI, and writes some of the resultant information as a new record in a table. In particular I want to do the following: Write a string value to a linked field in an existing table The string value to be passed is already guaranteed to exist as one of the linked options (since the user selected from a Select menu which is in turn populated from the table. *There are some other fields which need to be written as part of this record. The code looks something like the following. `` let machineNameField=tableTasksByMachineNumber.getFieldByNameIfExists(‘Machine Name’); let machineNamesRecord=useRecords(tableTasksByMachineNumber,machineNameField); let machineNamesList=machineNamesRecord.map(record=> {return(record.getCellValueAsString(machineNameField))}); let machineNamesListFormatted=machineNamesList.map(x=>{return({label: x, value:x})});` Machine Selection <Select
Hi, I am currently struggling with a script which runs in the scripting block but not within an automation. I have the following error while testing : However, it seems like I am respecting the restrictions given on the Airtable support site, so I don’t understand the problem. (I can share my code, if necessary)
I’m developing an API on Node.js + express on Heroku, and every time I fetch anything with POST, I get a 400 Bad request error. Postman requests to the same endpoint work perfectly. So the only hypothesis I have is that I need a ‘Host’ header in my Airtable request (when I remove the ‘Host’ header in Postman. I get the same 400 Bad request error), but I don’t know what this ‘Host’ header should be. To reproduce: Create a simple Node.js+express app on Heroku where you return the same body as you get: app.post('/', (request, response) => { response.status(200).send(request.body); }) Create Airtable automation with fetch (or an app with remoteFetchAsync): let response = await fetch('https://....herokuapp.com/api/', { method: 'POST', body: JSON.stringify('Hello World!'), headers: { 'Content-Type': 'application/json; charset=UTF-8', 'Accept': 'application/json'
Hi. I’m writing a python script to go into the database and retrieve data matching specified times that things have happened. So for example, event_a happened July 15, 16, 18, 21, 22 and 23 at 1500 each day. I was wondering if there was a way, using the python api, to have it only search as far back as, say, July 19th. One week ago. I know that the get_all, search, and get_iter functions all take a max_records argument, but that isn’t what I was looking for. I’m not saying only look for the first 100 matches. I’m saying only look back in time a week. Does anyone know how I could go about doing that? Thank you in advance.
I’m using Keyboard Maestro to build a script to update a record based on user input. The user will input the customer’s record ID, info to update and the script will be built like so: curl -v -X PATCH https://api.airtable.com/v0/xxxxxxxx/Students%2C%20Parents%2C%20Prospectives \ -H "Authorization: Bearer xxxxxxxx" \ -H "Content-Type: application/json" \ --data '{ "records": [ { "id": "'$KMVAR_ATRecordID'", "fields": { "Status": "'$KMVAR_Status'", "Lesson Day": [ "'$KMVAR_Lesson_Day'" ], "Teacher": [ "'$KMVAR_Teacher'" ], "Instrument": [ "'$KMVAR_Instrument'" ] } } ] }' This fails, with the API saying that “You must provide an array of up to 10 record objects, each with an “id” ID field and a “fields” object for cell values”. However, if I remove the “Teacher” line the script works correctly: curl -v -X PATCH https://api.airtable.com/v0/xxxxxxxx/Students%2C%20Parents%2C%20Prospectives \ -H "Authorization: Bearer xxxxxxxx" \ -H "Content
How do I get all unique values in a given column using the API. I can see the list of these values in the API docs but no query on how to get them?
Hello Everyone, I am looking for a script that solves a basic problem. I am running a cleaning service, and certain jobs(like glass cleaning, vacuuming, bathroom care) need to be done regularly on certain days of the week (for instance the fridge needs a once a week Fri clean). I filter out jobs based on the room and attach QR codes on the walls that will only show the active jobs in the room that day of the week. This way, I give my workers a set jobs and no one gets overwhelmed. I’ve made my workspace simple (at least to me). I have three tables (jobs, people, building/room) and I have fields with in the jobs that specifies the day of week I want it cleaned. I want the day of week (multiple select) to turn job status to active on the appropriate day. On the not appropriate day, I want the jobs go to inactive. There’s more work to do on the project than this, but this is a good benchmark. If any of you think you can help me let me know.
I’m using a base to record survey answers. The questions are constructed in a way that all answers are Yes/No. I’m using a single select field for the answers and I want two fields that will provide the total number of “Yes” answers and the total number “No” answers for each record. I realize I can create two additional fields for every question that will store numeric values for each answer choice and then use two SUM fields to provide a total for each type of answer, however this will result in two additional fields for every question. I’m hoping someone has an idea for a more elegant solution; most likely involving a script.
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.