Need development and API help? Ask your questions here!
Recently active
Hey all we use Miro to do our brainstorming and collaborate ideas so theres lots of notes, comments tags etc going on in there. We find it such a good way to start projects. I know there is a board to show whats in Miro but we need to bring the observations over to base as thats how we run the project. At the moment we are double handing - doing it in miro then adding to base later. Does anyone know of a way to get those comments, tags, notes out of miro and into Base - happy to do export/import just trying to reduce the double handling. Ive done a quick video here https://www.loom.com/share/a68af343b4d541a38965f3556df07697 thanks in advance
I want to be able to pick a value which and select some some other values which shows only values that contains values that includes values from first pick. I’ve been trying to play around with options.fields however I’m a little unsure what to put in as a fields value. I’ve tried ID’s and name values but I’m getting an error: ‘No field matching’ let filterArr = [] let filter = await input.recordAsync('Select Sender', base.getTable('Contacts').getView('Mills')) filterArr.push('rectBqFb8f8DtgRLW') let selectRecord = await input.recordAsync( 'Select a record', base.getTable(selectBase).getView(selectBaseView), { fields: filterArr, shouldAllowCreatingRecord: false } ) what do I need to pass as fields value?
Hi guys, I’m using Airtable.js with a base with over 800 records. This is my basic code to retrieve the records in chunks: function updateTable() { table.select({ maxRecords: 800, pageSize: 84, view: "Grid view", filterByFormula: filterDefault, sort: sortDefault }).eachPage(function page(records, fetchNextPage) { buildCard(records); buildModal(records); infiniteScroll(fetchNextPage) }, function done(err) { if (err) { console.error(err); return; } }); } updateTable(); Here’s what happens though. If I use fetchNextPage() by itself, all the records will keep loading when I initialize the page. This is problematic because, as you can see, I have sorts and filters I want to use to redraw the table, but they won’t work well until all the data is loaded (I haven’t figured out how to stop ùpdateTable() halfway). I have added an infiniteScroll to push more records only when I scroll down. However, if a filter is added
Hi, Before I start sharing SNIPPETs or SCRIPTs that can be tried, commented, improved by the Community, I am a bit lost in how to introduce the shared SCRIPT… What is in your opinion the best way to write a SCRIPT HEADER? What are the effects/consequences between no HEADER and a very full HEADER. If you would to take the time to answer me, I appreciate it very much, but please understand me: I am NOT asking these questions about the DOCUMENTATION of a SCRIPT which is another subject that has already been discussed here but about the lines that precede this documentation. Moreover, all the SCRIPTs without header that I use as examples have been documented by their Author’s Threads who also provided the necessary BASE for self-testing. Would I dare to say that my question is only about “legal” aspects ? Examples picked from here: Bill’s way: /* *********************************************************** ScriptBloqs - ScriptChain Copyright (c) 2020 by Global Technologies Corpor
Hi there, I have a pretty good sized, intertwined base. I am hoping to export all of my data and edges (relationships) into JSON. I know I can go through the API to retrieve the JSON, but am a little confused on how to expand the entire database. I know I need to retrieve records and use the offset to get the entire dataset, but I’m unsure as to where to code for this. Thanks!
I would love to create a block that shows only 1 record but bigger. As big as in the summary block. I use blocks as a dashboard displayed on a tv and records in the “Record List” Blocks are way too small. is there a way to write bigger letters in blocks. JS code ? Thanks
For Airtablers interested in the scripting block, I’ve added a few new example walk-throughs to my blog: Setting attachments from URLs Converting scores to ratings Using reduce to sum data Creating records in batches
Hi Airtable! I have an Integromat scenario that uses Airtable API. My understanding is that I would use “List Records” from the table I will use (API), then copy and paste both the URL and Bearer Key into Postman and use “Get”, but when I run the Integromat scenario it requires authorization. It seems that I did get that, but maybe I am missing something. Any suggestions would be appreciated. Thank you, Mary Kay
Hi, I’d like to be able to register a remotely hosted service worker within a custom block in order to activate push notifications. I tried it but I faced cross-origin errors because the iframe is on a different origin from the remote service worker. Any ideas how I could achieve this? Thanks in advance, Fatma.
Hi, I’m using Airtable-js to build a website using my Airtable as a source. Because my table has 800 records, I’ve added a click event before fetching more pages of my table, but fetchNextPage is behaving strangely. Instead of fetching regular blocks (my page limit is 36), each request seems to be multiplied by two, thus first it works, then it returns a duplicate block, and eventually it bloats to the point of hanging. Check the code below. You can see eachPage renders more cards whenever I hit the bottom of the page. function updateTable () { table.select({ maxRecords: 800, pageSize: 36, view: "Grid view", filterByFormula: filterDefault, sort: sortDefault} ).eachPage(function page(records, fetchNextPage) { records.forEach(function(record) { var rc = record.fields; var $dataContainer = $('#data-container'); var $cardAlign = $('<div class="d-flex align-items-stretch col-xs-12 col-sm-6 col-md-4 col-lg-2" data-toggle="modal
Our calendar table has a primary field of type datetime with the local format When using the API to update a link record in our bookings table with the recordId from the calendar, it is displayed in the US format A linked table shows the local format, it is just the lookup table that is wrongly presented In the picture above 3rd record we copied and pasted the date which is then the correct format Is this a bug?
I have a scripting block setup to create a series of 50 linked records when needed. These act as a checklist workflow and are linked to the original project in the other table. My only issue is trying to pull in the Single Select field for City to fill in the 50 linked records. I need the city to pull from the selectedEvent and not the checklist template. // pick tables from your base here let checklist = base.getTable(‘Project Workflows’) let templateView = base.getTable(‘Project Workflows’).getView(‘Expansion Workflow Template’); let templateQuery = await templateView.selectRecordsAsync(); let templateRecords = templateQuery.records; let noChecklist = base.getTable(‘Ongoing Projects’).getView(’**Expansion Projects ALL’); // Select Event to Create Checklist let selectedEvent = await input.recordAsync(‘Choose Event to Create Checklist’,noChecklist); // create the tasks let createRecords = templateRecords.map( c => ({fields: { 'Task Subject': c.getCellValue('Task Subject'),
Hello, I have an Express POST route that creates a record. When I test the API, it successfully creates the record populated with all the right info (I checked the table). However, I receive no response from the API (Postman times out, and in the console I get - - ms - -). Here’s a snippet of my Express POST call. router.post('/submitimportedorders', (req, res) => { importedCarOrdersTable.create(req.body, function(err) { if (err) {console.error(err);} }); }) Would love some help with this. I can also provide more code if required.
Hello! The video snippets block lets you play video files uploaded to an attachment field. You can preview a whole video, or specify start and end times by selecting duration fields containing timestamps. We’ve been using it internally for meeting recordings and user research sessions. In these bases, we have the videos stored in one table, and we have a second linked table (“Nuggets” in the screenshot below). The records in this second table act as bookmarks into specific parts of the videos. → Click here to join the beta. Once you click that link, the “Video snippets” block will be available in the list of blocks when you go to install a block. P.S. The source code for this block is available here, so you can remix it if you’re in the custom blocks beta.
I wrote a formula to find and replace two text strings, and luckily it worked. REPLACE(REPLACE(Description,FIND("<p>",Description),LEN("<p>"),""),FIND("</p>",REPLACE(Description,FIND("<p>",Description),LEN("<p>"),"")),4,"") But I can imagine a situation where I would want to replace more unique strings within another field without using an excessively long formula. Each unique text string makes this formula substantially more complicated. Is there a possibility of adding iterations to the formula field using a built-in array (multi-select field) or custom array such as [1,2,3,7,13] as the input? This would mimic Javascript’s “for” function.
Currently the Blocks SDK creates the deps for the acorn library which has a security vulnerability: Upgrade acorn to version 7.1.1 or later. For example: “dependencies”: { “acorn”: “>=7.1.1” } or… “devDependencies”: { “acorn”: “>=7.1.1” } Always verify the validity and compatibility of suggestions with your codebase. Details GHSA-6chw-6frg-f759 moderate severity Vulnerable versions: >= 7.0.0, < 7.1.1 Patched version: 7.1.1 Affected versions of acorn are vulnerable to Regular Expression Denial of Service. A regex in the form of /[x-\ud800]/u causes the parser to enter an infinite loop. The string is not valid UTF16 which usually results in it being sanitized before reaching the parser. If an application processes untrusted input and passes it directly to acorn, attackers may leverage the vulnerability leading to Denial of Service. The solution is to upgrade the Blocks SDK to use a newer version of acorn.
Hello. I am trying to implement a search functionality using the record id is this possible given that the id isn’t in one of the fields? As an example, I have the following records records: [ { id: “rec2PRjhAMAh2O64a”, fields: { Name: “blah blah”, }}, { id: “rec2otu8JF7ijlmA4”, fields: { Name: "klkdsd ", },] I want to search by the id. Is this possible?
Hello I have a product table. And want to use a button to order the products. And then create order records in order table (pulling 3 columns from product table) and link the two tables. product id - order id need some help im green John
Whenever I try to make a post request using fetch, the Failed to Fetch error is returned. However, if I call wikipedia it goes through. I have tried this with so many other websites e.g http://api.worldbank.org/v2/country/all/indicator/SP.POP.TOTL
Hello, I’m facing error : “Record missing in table”. I work on Block and I’m creating a custom block. I have a table (“my_table”) with data and I want to read all the fields for a specific primaryField. The specific primarityField will be transmitted in a Label Select (value). The code works, but when I delete one line from my table, I got the error : “Record missing in table”. I can add new line without error. Do you think my error is in the declaration of record ? Did I misunderstand one principal of REACT or similar ? Bellow my code to help to solve the issue : const base = useBase(); //--------------------------- label Select -------------------------- // We get all the fields from "my_table" and put in selection_value_picker const table = base.getTableIfExists("my_table"); const selection_value_picker = []; for (let i = 0; i < table .fields.length; i++) { selection_value_picker.push({ value : table.fields[i].name, la
Hi! I’m curious if anyone know how to implement a copy-to-clipboard in an Airtable Block that’s similar to how this Color Palette works, https://support.airtable.com/hc/en-us/articles/115013249087-Color-palette-block. I’m hoping to make different lines of text clickable to facilitate fast copy & pasting of code snippets.
I have three tables - Organizers, Events and Players. Organizers have events and players are part of an event. I want to pull the most recent event for a particular organizer through the API via a GET, but can’t figure out how to do that. I’d also like to pull in a particular event by ID. In this case, I’ve pulled the ID of the event into a column (RecordID) via a formula (RECORD_ID()), but don’t know the correct URL parameter to send. Thanks in advance.
Does typecast only work on .create? What if I want to update a mule-select field in update? base('Sites').update([ 79 { 1 "id": recId, 2 "fields": { 3 "siteStreetAddress": {!!placeDetailsObj.street_number ? placeDetailsObj.street_number + ' ' : ''}{!!placeDetailsObj.route ? placeDetailsObj.route : ‘’}, 4 "siteCounty": {!!placeDetailsObj.administrative_area_level_2 ? placeDetailsObj.administrative_area_level_2 : ''}`, 5 "siteState": `{!!placeDetailsObj.administrative_area_level_1 ? placeDetailsObj.administrative_area_level_1 : ‘’}, 6 "siteCity": {!!placeDetailsObj.locality ? placeDetailsObj.locality : ''}`, 7 "siteZipExt": `{!!placeDetailsObj.postal_code_suf
Hello. I’m learning the scripting block and not a programmer but hope to get my feet wet. I have taken the basic script to “select a record” and added that to a button called COPY. // Change this name to use a different table let table = base.getTable("Table 3"); // 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); if (record) { // Customize this section to handle the selected record // You can use record.getCellValue("Field name") to access // cell values from the record output.text(`You selected this record: ${record.name}`); } else { output.text('No record was selected'); } But now I want to use the record selected to copy Field 1 (which is a lookup field) into Field 2 which is just a basic number field. Can anyone point me how to “copy” data from one field to the other?
Pretty new to Airtable and Javascript I’m trying out Airtable to see if I can organize my organizations data better. When importing new data to our database I would like to read from many text files, collect the data from the files (which unfortunately isn’t organized too great), and insert the data into tables. Is there a way to queue multiple text files to read with fileAsync? There are hundreds of files, so doing one at a time is not useful.
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.