Need development and API help? Ask your questions here!
Recently active
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.
Hello! I asked here a couple of weeks ago whether my apps are really slow because of the number of records in my table. It turns out that is the case, but I have a couple of followup questions. Is the decrease in performance related to the number of records size of the base or of the individual tables? Is it possible to load a table or base into an app conditionally? And if that is possible, would it even improve the performance of my apps? My experiments so far result in the “too many hooks rendered” error. For ex: const base = useBase(); let records=null; let table=null if(something is true)){ table=base.getTableByNameIfExists('Line Items'); records= useRecords(table) } Any other suggestions for how to improve app performance on large bases/tables? I don’t think I really have the option of deleting records or archiving them in another base because my system of linked records makes it complicated. Thanks so much!
Hello everyone, I am creating a script that will ask the user for a project name and a hand-over date, and then the script will generate a number of records with subsequent dates (to create a Gantt chart, essentially). I want this done through the script because the intervals between the dates is always going to be the same. I am however struggling to find how to add say 5 days to the date I just collected from the user. I can’t seem to find an easy way to do it when creating a new record. Here is my current code… output.markdown('Welcome to the Add-New-Project routine'); let projectName = await input.textAsync('What is the name of the new project?'); let handOverDate = new Date(); if (await input.buttonsAsync("Hand-over date", ["Today", "Custom"]) === "Custom") {let newDate = await input.textAsync("Enter a date: M/D[/YYYY] (Current year implied if not included)") let year = newDate.slice(-5, -4) === "/" ? "" : "/" + handOverDate.getFullYear().toString() handOverDate = new Date(`${ne
Are there any ways to share a script to the public? Or a way to use coding to update Airtable forms? The airtable forms aren’t advanced enough to use for our application. Thanks in advance!
I’m struggling to find anything on the web to teach me how to builds outputs from the API from scratch. Is it a prerequisite that I am already accomplished with Javascript? [I know programming concepts and am a beginner] Youtube and Google have a few sparse videos but nothing like a course I can take that will bring me up to speed quickly.
Hi there - Does anyone have more specifics on how to use AIrtable as a backend? Mostly, I want to create a custom form where the questions and answers shown are based on previous answers and custom filtering that is too complex for views. This is a tutorial, but I am not sure if it’s only a matter of setting up an HTML with a javascript section(I’ve never had a javascript application on a webpage) or something else… DEV Community Using Airtable as backend service The hell of finding the right backend When it's time to write a Single Page Application in...
Hi, I am getting this error for all calls to remoteFetchAsync. j: Error: Non-200 Response Received: 500 Our request, looks like below. let response = await remoteFetchAsync(qbBaseURL+"/v3/company/"+qbRealmId+"/query?minorversion=62", { method: ‘POST’, body: “select * from Customer Where DisplayName LIKE '%”+customerName+"%’", headers: { ‘Content-Type’: “application/text”, “Authorization”: "Bearer " + qbAccessToken, “Accept”:“application/json” }}); let data = await response.json(); Can someone pls assist? Regards.
I created a “sandbox” base to develop this script to create a new hypertext field from a text field and a URL field: When I got it working in the test base, I copied the code into my live base. The field names were different there, so I edited the script accordingly. I ran it and it worked. This script doesn’t run automatically, so after I entered new records, I ran it again to populate the empty hypertext field in the new records. Now the script doesn’t work properly. It calls the text and the URL into the destination field, but it doesn’t format them as hypertext. Here’s the result: I checked that the destination field was long text with rich formatting enabled. The code still works in the sandbox base, so I tried copying it back into the live base (and changed the field names again in the script). Will not work, even if I create a brand new destination field for the hypertext. What could be wrong in my live base that’s keeping the URL from embedding when I’m using the same code
Fetch YouTube video metadata and insert it into each row in a given table. Source code /** * Copyright 2020 Bocoup * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to * deal in the Software without restriction, including without limitation the * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or * sell copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM
Ok, I have this script, but I need to check only for duplicates in the same table. Thoughts on what I need to add to ensure the record pulled is not self linking in linked records? //Define the table and query let jobTbl = base.getTable(“Caregiver Applicants”); let appQuery = await jobTbl.selectRecordsAsync(); //Loop through the records and find the Applicant for (let record of appQuery.records) { let appname = record.getCellValue("E-mail"); //Define linked table and query let applicantTbl = base.getTable("Caregiver Applicants"); let applicantQuery = await applicantTbl.selectRecordsAsync(); //Loop through linked table and match ID values for (let appRecord of applicantQuery.records) { if (appRecord.getCellValue("E-mail") === appname) { let inputid = appRecord.id; //Update field jobTbl.updateRecordAsync(record, { "Additional Records": [{id: inputid}] }); } } } This ends up linking the original record to itself.
Hi all! I’m working on a script that grabs two fields from a table as query parameters in a API GET request, gets the resulting JSON data, and updates the records in the same table for those corresponding queries. I have my for loop running fine when I limit it to 50 records (notice the IF statement) and aware of the 50 record limitation by Airtable. How do I go about refining my script so that it grabs the remaining records? I’ve been banging my head against a wall on how to do this since Friday. Here’s the script I have so far: //Set table for Stage Data let testTable = base.getTable("Test Table"); let stages = await testTable.selectRecordsAsync(); let recordsData = []; //Testing for loop for (let record of stages.records) { let url = `https://apiwebsite?filter[account][customId]=${record.getCellValue("Query Param")}&filter[stage][id]=${record.getCellValue("Query Param")}` if (recordsData.length < 50) { let data = await fetch(url, { method
Right now I am able to upload attachment (which is there in ‘data’ variable, without using FormData). using this code : var filename = url.split('/')[url.split('/').length - 1]; var data = await fetch(url).then(res => res.blob()); console.log(data) var upload = await fetch("https://api.product.ai/v1/queues/139331/upload", { body : data, headers: { Authorization: "token " + key, "Content-Disposition": "attachment; filename="+filename, "Content-Type": "application/x-www-form-urlencoded" }, method: "POST" }); console.log(upload); Now I also want to upload JSON data along with the attachment using same Post method . This JSON data will contain cell values of different cloumns in airtable. For this, the software has curl and JS code for uploading data. It uses form-data option for uploading attachment and other metadata(cell values of the airtable Table). Airtable does
Hi - I am very new to scripting and looking for advice on how to update the existing script. I grabbed this pre-made script from the Airtable library to create child records. In addition to creating the child records, I was hoping to update a field on that child record as well with an inputted value. Can anyone advise on what updates to make? let settings = input.config({ title: 'Create child linked records', description: `For a record in a "parent" table, this script will create some number of “child” records in another table, where each “child” references the “parent” through a Linked Record field.`, items: [ input.config.table('parentTable', { label: 'Parent table' }), input.config.table('childTable', { label: 'Child table' }), input.config.field('linkField', { parentTable: 'childTable', label: 'Linked record field', }), ], }); async function createChildrenLinkedRecords() { let { parentTable, childTable, linkField } = settings; if ( li
Hey all! I wish to make a website in pory.io that integrates with airtable The website is an idea suggestion page where anyone can post an idea and the others “vote” / “like”. The issue is that I can’t seem to find how to create this script that will know to update the filed in the table. So please help :]
Hello there so here the situation I’m creating a Laravel + Airtable Website this is what I did : so first I created my design & page convert them to blade.php I created a JS file to fetch data from my Airtable base with multiple field & tabs parse those data to pages here the code :slightly_smiling_face: var type = "Regions" var api_key = "?api_key=*************" var perPage = "&pagesize=2000" var maxRecords = "&maxRecords=2000" var url = "https://api.airtable.com/v0/app*********/" + type + api_key + perPage + maxRecords + "'"; const app = document.getElementById('root') const card = document.createElement('div'); card.setAttribute('class', 'rightcontainer w-container') app.appendChild(card) async function catchJson() { const response = await fetch(url); const data = await response.json(); if (response.status >= 200 && response.status < 400) { data.records.forEach(records => { const records_length = document.ge
I want to share my dashboard with installed blocks with other user without sharing my base/views. I am not able to find anything. Please help
Hi everyone I’m using miniextensions to create individual URLs from Airtable records - which works just fine, but I want to be able to password protect these URLs (perhaps adding some javascript to the code?) so that you have to enter a password before being able to view the content of that page. Is this possible? I’ve explored using Pagecrypt but this only seems to work if you individually create an html file manually from each record, having already run the miniextensions app. What I need is for each new URL generated in each record, this to already have the code built into it. Any guidance much appreciated! Thank you :grinning_face_with_big_eyes:
How do I use the REST API to delete ten records at a time using axios? I can successfully delete one record at a time, but due to the API design, I am having a problem constructing the URL to delete ten at a time. Here is what works with one record at a time: I am using a library in Node.js called axios to do HTTP method calls, and here is the call that works: await axios.delete(url, {params: params, headers: headers}) .then(async function(response) { console.log('DELETED:', response.status, response.statusText); }); I define params this way (I have a method call that returns the params to send to axios) params = await getParams(rec); // rec is the Airtable record identifier like: `rec async function getDelParams(rec) { const params = { 'records[]': rec // rec is like: rec5GWL8xCpofFKFC }; return params } In this key/value pair, I can only have one entry of : records[] , no more, I need ten. The REST API requires multiple recor
Can I just get a confirmation that DOMParser isn’t supported in the Scripting app? I’m trying this: let parser = new DOMParser(); let html = parser.parseFromString(htmlString,"text/xml"); And getting this: ReferenceError: DOMParser is not defined
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.