Need development and API help? Ask your questions here!
Recently active
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
Hi, would Airtable block or flag my application somehow if I was using short polling to retrieve data from the api like every 5 seconds for a long period of time, not many connections would be using it, mostly an admin app made in React? Thank you
Hello, I have a table representing a guest list with prefilled columns for ‘Name’ and ‘Surname’. I have a form the guests can fill to check that they are on the guest list. the form has inputs for Name and Surname. My ‘POST’ method works i.e it returns the found guest along with the row’s ID in some cases but for other cases, it returns an empty array. Does anyone know what could be causing this? Many thanks
I’m trying to submit a request from an external database to add records and an error comes out. Tell me, is there any way to remove the restriction? {“error”:{“type”:“INVALID_RECORDS”,“message”:“A maximum of 10 records can be created per request but you have provided 32.”}}
Hi, I’m following this tutorial to run a hello world Airtable app: Hello, World Airtable app . Everything runs well on blocks-cli after I execute block runs and I have https://localhost:9000 displays on my browser without any issue. However, when I come to the app section on Airtable, it shows an error log: /usr/local/lib/node_modules/@airtable/blocks-cli/transpiled/src/builder/node_modules/yaml/index.d.ts: Cannot read property 'get' of undefined (screenshot below). I’ve tested on both Node 14.0.1 and Node 12.0.0 & reinstall @airtable/blocks-cli multiple times but no luck. Anyone faced this issue before? I highly appreciate any help!
Hello, all. I am able to return data after an API from all bar one row. All rows seem identical i.e no empty fields. Does anyone know what might be happening? Thanks BTW If I query using Postman I get the expected result?
Hi Everyone! Thanks for you time beforehand and apologies if this case was already resolved in another topic (altough I couldn’t find any similar). I am pretty new to airtable scripting and I hit a roadblock in one of my codes. I need to iterate and create multiple linked records into a table, but my code is throwing me the following error “j: Can’t create records: invalid cell value for field ‘Property’. Cell value has invalid format: .0.0 must be an object. Linked records field value must be an array of objects with property ‘id’ corresponding to linked record id.” I assume this is because I have to put some sort of id in the createRecordAsync function, but I am not sure how the syntax for that should be. Full code: let importTable = base.getTable('Master List'); let importView = importTable.getView('Active'); let importQuery = await importTable.selectRecordsAsync(); let newTable = base.getTable('New Table'); for (let record of importQuery.records) { let recordName = record.getC
Here is another discussion I opened on the Gatsby forums Anyone know how to rename a node's file extension? · Discussion #33916 · gatsbyjs/gatsby · GitHub The gist of it is, I am expecting the api to give me back exactly the file extension I want, yet it seems to compress it or otherwise rename it to an mpga. Is this a quirk of the API, or something specific to what I am using?
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.