Need development and API help? Ask your questions here!
Recently active
Hello, @Joris_Grouillet made me this script to search for {tag} and replace by the tag column. Am in urgent need of some changes but don’t want to be too much of a burden so I ask here. Could someone please help me modify the script so that: It replaces every occurence of a match in a cell (e.g. if there is {name} twice in a cell, it replaces both and not just the first it finds) It searches for tags in […] rather than {…} it searches and replace in place rather than in an additional field. (i.e. it uses the same field for template and destination) If possible, it is dynamic and uses regex to find any tag in […] and replace it with the matching column. I urgently need the first enhancement, the rest are more for the convenience of my workflow. Here is the script: (async ({ record_id }) => { async function getClientById(recordId, clientsTable){ const queryResult = await clientsTable.selectRecordsAsync({ fields: ['nom', 'code', 'ville', 'templat
Hey, This used to work and stopped. Tried it with a new app and button too. Whenever I click an open app button when the record is expanded, it seems that the window message with the record id is not delivered to the app. I get the following error in the console: Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('https://block--t-qtk-d2-z-an-c-dz-kv--b3r294g.alt.airtableblocks.com') does not match the recipient window's origin ('https://airtable.com'). The app DOES open in the extensions dashboard when clicking an app open button from the grid view.
Hi everyone, I want to use airtable as a CRM and activity tracking tool. My logic is: We are working on a project - project table Each project contains 1-n project items - project item table, each record linked to a project Activities are tracked on a project item level (date, effort, related project item) - activity tracking table, each record linked to a project item Now i want to automatically create invoices for my projects for certain invoice intervalls. For this i need to find all related activities (easy, also with an automation) and group them for each project item, in order to create the respective invoice items (tracked activities per project item within the invoice intervall). For this I have created a seperate “invoice item table” in which i currently also have a seperate automation, that gathers all activities for the respective items within the intervall. my core question is: can i combine and automate the necessary steps in a script? Find all activity tracking records (
Non-developer type here! My team is using Airtable as a task management tool Each week we run a report, which includes a long text field (“Details Field”) with details on the work performed on a specific task during that week. To retain a record of the content that’s appeared in the Details Field, I wonder if it would be possible to write a script that would copy and clear the values of the Details Field and cumulatively add them to a field (“History Field”). The History Field would then eventually contain a list of all the updates that’s been put into the Details Field over time (and ideally with date stamps to next to the text that was copied at a given time). Thanks so much for your feedback on this! Jens
Hi everyone! I would like to have a Login Vault on Airtable accessible to a client, but for more appearance of security we’d like to have the Password field entries all show up as *********** and were wondering if there is a script or another way to allow a “click to reveal password” action or “click to copy” option if not the first?
Hi all, Hoping someone could help me correct a script. I have a base with multiple tables in it. There is a table called “Projects” and another table called “Potential Photoshoots”. I’m trying to use a script to move a single record from the “Potential Photoshoots” table to the “Projects” table. It should then delete the record from the “Potential Photoshoots” table. This all should happen automatically when a button is clicked. NOTE: The button field name and the button label are both titled “Move to Projects” and it exists on the “Potential Photoshoots” table. I’m new to Airtable and not very proficient with scripts, but I’ve been doing research and playing around to try and learn. I was able to work out the following script, but it doesn’t move the specific record whose button was clicked. From what I understand, that is because I need to use an input.recordAsync call. I think I understand where that should go, but it seems to cause other errors in the script when I add it. I also r
Hello everyone, I’m building an app that picks data from Airtable. All the listed APIs expect the table name as an input. I’m looking for an API to get a list of all the tables in a base. Is there any API, or any workaround for this? Thanks
Hi guys! I’m attempting to fill in a field with linked records from another table. The values being entered are flight names based on flight confirmations. As flight confirmations go, they often have multiple flights on them. For some reason, even when using the method outlined in the scripting reference, my values are still overriding. Annoyingly, I can quite literally see this happening by watching the table after running the script - so I know the extra flights are going in the right place, they just don’t want to play nicely with all the other flights! The code snippet that’s updating the flights is below, hope someone can help! if (flights !== undefined && flights.length > 0) { // INSERT FIRST FLIGHT let updateRecord = await passengerFlightsTable.updateRecordAsync(record, { 'Flight Name': [{ id: flights[0].getFlightID() }] }); flights.shift(); // get rid of first flight so one-wayers are accoun
I’m trying to overwrite a Field’s options with a list provided dynamically from data that is imported. I have successfully updated the options to use the previous values in addition to the new set of values (similar to the example the documentation provides). However, the use case for my app is to start from scratch: delete all existing records (and ideally field options), and import a fresh set of data with field options that match the new data. The documentation points to UpdateFieldOptionsOpts as a way to do this, but after trying a few combinations, I have not gotten it to work. Any thoughts from the community on what I might be doing wrong? Here is some sample code to demonstrate the issue: let choices = { choices: [ {"name": "Option 1"}, {"name": "Option 2"}, ] } if (field.hasPermissionToUpdateOptions(choices)) { await field.updateOptionsAsync(choices, {"enableSelectFieldChoiceDeletion": true}); }
In a fetch for JSON POST adding these two headers: let response = await fetch(url, { method: 'POST', body: JSON.stringify(data), headers: { 'Content-Type': 'application/json', 'Accept': 'text/plain', } }); returns a TypeError: Load failed message. But the target API needs both headers specified. Each header individually does not error, but the API doesn’t respond. Any help appreciated.
I’m trying to test a very simple script, but I can’t seem to output specific fields to a table, no matter which fields I specific in selectRecordsAsync, the output is always the same: fields id and name. My code: let table = base.getTable("Procedimentos"); let query = await table.selectRecordsAsync({fields: ["Procedimento","Descrição"]}); output.table(query.records); What am I missing?
how to use script to send record to stripe? who can
Hey everyone Having a bit of problems with this script. I have a tasklist and at the end of the record I have a delete button. When I press the button I want it to delete just that record. But when I use this script it seams to delete just any of the records in the list except the record I want to delete. Can someone pls advise? // Delete a record in the Tasks table let table = base.getTable(“Tasks”); let query = await table.selectRecordsAsync({fields: }); let recordId = query.records[0].id; await table.deleteRecordAsync(recordId); console.log(“Deleted a record!”);
anyone know how to use jalali calender in scripting app airtable?
Is there any way to access the history/activity on a record I’m looking for a way to see the rowActivityInfoById for a record so I can audit what fields are being changed over a certain time period. I’m ok with coding it up, I just need to know I can retrieve the activity anywhere. Any help would be much appreciated.
I want use scripting app for convert gregorian calender to jalali calender. I have a field named as ''date" for Gregorian and an empty field named as"Jalali" for result of code. for convert I want use of this code: // let day = new Date().toLocaleDateString(‘fa-IR-u-nu-latn’); console.log(day); // But I don’t know how to put field names in the code! and also I want the result, entry in jalali field.
Hello! I hope this is a simple question for you all, I need to be able to update any field with a certain value. is there a way for me to make the field name that I want to update into a variable so I can change which field I want to edit? var varField = 'fieldnameOrID' base(TableHere).update(RecordHere, { varField: "done", }, function(err, record) { if (err) { console.error(err); return; } }); this is something like what I would want to do. any help?
Hi, I have written a function that fetches the table value based on the table name and primary field number = Uf79266972d007f2a3886bf73676860 async function sendContent(number, studentTable, contact) { const records_Student = await base(`${studentTable}`).select({ filterByFormula: `${contact} = '${number}'`, view: "Grid view", maxRecords: 1 }).all(); var td = await totalDays(number, studentTable, contact) records_Student.forEach(async function (record) { studentName = record.get("Name") console.log("Name = ", name) }) } sendContent(number, "Students", "UserID") It gives the following error AirtableError { error: 'INVALID_FILTER_BY_FORMULA', message: 'The formula for filtering records is invalid: Unknown field names: uf79266972d007f2a3886bf73676860', statusCode: 422 } But, If I pass number as 50373. and call sendContent(number, "Students-2", "ChatID") It retrieves the name successfully. Any idea what is causing this issu
Require Map script to add two markers from two separate fields in table. Im successfully using the script Add image from Google Maps This script populates an attachment field with an image from Google Maps using a field with an address
Hi, I would like to ask what is wrong with this script below. What I’m trying to achieve is search a particular word on a given string and make sure that the word is not misspelled by not having any additional letter or numbers at the beginning or end of the word (Special characters are allowed. Case sensitive search). What happens with this script is, it fails to search for the given word even if nothing is added before or after the word. I have tried my RegEx on online testing tools and it actually works fine. If you guys know any alternative for my scenario please do let me know! Thank you very much. let subcategoryName = currentSubcategoryRecord.name; let keyword = new RegExp(`[^a-zA-Z0-9]${subcategoryName}[^a-zA-Z0-9]`); isProductTypeExists = checkRecord.search(keyword); if (isProductTypeExists == 0) { //Product exists! } // -1 is returned for no match found.
Today Airtable give me error on “filterByFormula” it was working fine earlier. Anyone had same problem like me.? reply : Error parameter validation fail Thanks.
Hi all, I’m trying to link my a “parent” record to new created records in a script following this source. But I keep on getting the error “TypeError: newRecordId.getCellValue is not a function”. The code can be found under " /Link the new record (child) to the parent record/". Thanks for the help in advance… it’s very much appreciated! let inputConfig = input.config(); let table = base.getTable('Progress General Indicator 🚫'); let projectsTable = base.getTable('Projects 🖌'); let indicators = inputConfig.linkedIndicatorIDs; let projectID = inputConfig.projectID; let recordID = inputConfig.recordID; let linkedIndicators = inputConfig.linkedIndicators; /*Create new records (children)*/ for (let indicator of indicators) { console.log(`Adding indicator ${indicator} to the new record.`); console.log(`Adding project ${projectID} to the new record.`); let newRecordId = await table.createRecordsAsync([ { fields: { /*'Projects 🖌': [{id: p
Hi everyone, I found this very good script template, and need help with some adjustements please. “Collaborators” used to be a dependency field, called “Followed By”, but I would like to use this field rather to assign collaborator names, that are stored in a separate sheet called “Collaborators”. The purpose of the Base is to automatically assign tasks and collaborator names to classes. Here is the code: // when a new asset is created, // there are a certain number of tasks that must be completed // these tasks are dependent on the type of asset // Given a list of project and task templates, // when a new asset is created and has a project template assigned // we can then create corresponding set of tasks for that asset // define some of our initial variables // these are the basic table, field and view names to define to create the script const project_table_name = ‘Classes’; const new_project_view_name = ‘New Projects’; const project_template_link_field_name = ‘Project Template’; co
Hello there, I’m Vihar from Appsmith, and I’m here to share a major update on Appsmith’s latest release (1.7.10) with the Airtable community. Today, our integration with Airtable comes out of beta and is available for everyone :tada: ! You can now build custom UIs and interact with applications built on Airtable with minimal configuration. Appsmith is an open-source framework to quickly build any custom business software like admin panels, internal tools, dashboards, and more with pre-built UI widgets that connect to any database, GraphQL or REST API, controlling everything with Javascript. While it is possible to use the default API interface to connect to Airtable, we wanted to make it easier for you to directly connect to your Airtable account and create applications faster than ever. This new data connector introduces several features: Integration is located in the “Datasources” section. Connect to your Airtable account with either an API Key or a Bearer Token (OAuth 2.0). Cre
I am trying to create a script in Airtable to give me the sum of a row in a table, but I am new to JavaScript. Any help would be most appreciated, thank you
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.