Need development and API help? Ask your questions here!
Recently active
Trying to use scripting and automation blocks/apps to send HTML emails (similar to sendgrid block) but there is currently only support for sending markdown rendered emails currently. Any workarounds or upcoming updates that anyone knows of?
Hi all, I have created a table with teachers and their availability. Each line corresponds to a teacher, and my columns are the different weeks of the year. The field type of my columns is a linked record, so that I can have multiple date filled in for one week. It looks like this: Name of the teacher // availabilities w1 // availabilities w2 // availabilities w3 // … Tom Sawyer // Mon. Jan. 1st, Tue. Jan. 2nd, Wed. Jan. 3rd, Thu. Jan. 4th, Fri. Jan. 5th // Mon. Jan. 8th, Tue. Jan. 9th // Mon. Jan. 15th … I would like to write a script to go through these “availability” columns and for each record in it, create a record some place else. So that I would have something like: Name of the date // Name of the teacher Mon. Jan. 1st // Tom Sawyer Tue. Jan. 2nd.// Tom Sawyer and so on Then, I could match the records with the same name, so that I have all my teachers available for one given date. Is there anyway to do this using the scripting app? I am very new to js so don’t really know wher
I’m writing a small package for the julia programming language intended to wrap the airtable REST API to make it a bit easier to access within scripts. Julia has a pretty strong culture of including automated testing of packages, and I was wondering if there’s a sort of dummy table with an open api key that could be used for this purpose. I can create a dummy account and use that, but wanted to know is there a sanctioned way to do this if not, is there any reason not to make a dummy account
Hi everyone, Is there any way on a script to link to a record directly from the script window with the output object ? My usecase is the following : We use a script to detect all missing information in a table and show records where some are missing. We use output.table for that and it works great, but it lacks a way to be able to expand the corresponding records to directly modify it without being forced to do a search on the view panel to find the same records. Thanks for the help :winking_face:
//Can someone look at this simple example I cooked up. I expect Object.keys to return keys and //Object.values to return values. its easy to setup I just used a new blank template, named it Table and //put some names in Name and Done’s in Status. dictionary = ; let table = base.getTable(“Table”); let queryResult = await table.selectRecordsAsync(); for (var record of queryResult.records) { if (record.getCellValueAsString(“Status”) == “Done” ){ dictionary.push({key: record.getCellValueAsString(“Status”), value: record.getCellValueAsString(“Name”)}); } } output.table(Object.keys(dictionary)) // Why doesn’t this output keys output.table(Object.values(dictionary)) //why does this output keys and values? // this is the output I am getting
Hi, I am trying to have an app that dynamically shows information from calling a service whenever a new cell is selected. This is working, but it seems to be stuck in an endless loop and continually re-renders even when the selection is not changing. Any React guru who knows a better way please chime in! import React, { useState, useEffect } from 'react'; import { initializeBlock, useBase, useRecords, useGlobalConfig, useSession, useLoadable, useWatchable, Heading, Box } from '@airtable/blocks/ui'; import { cursor } from '@airtable/blocks'; import ConfigField from './components/ConfigField.js' const _ = require('lodash') const axios = require('axios') function UpdateAsin() { const base = useBase(); useLoadable(cursor); useWatchable(cursor, ['selectedRecordIds', 'selectedFieldIds', 'activeTableId', 'activeViewId']); const table = base.getTableByIdIfExists(cursor.activeTableId) const globalConfig = useGlobalConfig(); const c
Hello Airtable engineers, I’d like to build a few custom apps for my airtable, the first of which is a form to input records into a predetermined table. I’ve dabbled a fair bit with vue.js but never a single project with React, so I’m a total newbie. To aid me on my learning journey, I’m looking for some examples that I can pull apart. Specifically, I’m wondering if anyone has a simple data entry form for creating new records in a table. A field for creating linked records (to a different table) would be an extremely helpful example. Any advice or examples you might have are greatly appreciated! Cheers, Kris
I’m getting a weird behavior when iterating over Records, it looks like the code is skipping items. I’m thinking it is either my code or a cache bug. here is an example
Is there a way to tell Airtable API to ignore unknown fields when creating records via API ?
Hello! We use a simple bid and job numbering system to create new bid and job numbers, and we have a table in a base where we input a new record for each new bid and job. Is it possible to have the scripting app do this for us automatically (or after clicking a button or run)? The recipe for bids and jobs is as follows: XYY.MM#.### where: X is 5 for jobs, and 4 for bids YY is the 2 digit year such as 20 for 2020 MM is the 2 digit month, such as 09 for September and #.### is a running counter of the respective bids or jobs that we have, such as 3232 for bids or 6933 for jobs. Here are two examples: 520.096.933 is a job that was created in September 2020 and is the 6,933rd job that we have ever created. Is this possible to do with a script?
Hey there! I’m trying to create my first custom app, but I’m running into this error when trying to initialise it: I’m running this command (copied from the “Get started” flow of creating anew custom app: block init appql2cWuSDIYP4pk/blk5ErqYl4U45VObE --template=https://github.com/Airtable/apps-update-records MY_APP I get this error: No valid exports main found for '/Users/ME/.nvm/versions/node/v13.4.0/lib/node_modules/@airtable/blocks-cli/node_modules/@octokit/endpoint/node_modules/is-plain-object' I’ve already updated npm to the latest version and I also installed octokid/rest, since I thought it had something to do with it. Does someone know how I can get past this hurdle? Thanks! Oli
Hi, I have a table of orders, with their value in $. I wanted to create a dashboard that will show the current sum of the orders vs. a goal. Since there is no (as far as i found) a way to do that with the current apps, i thought of using a script. Can someone share an example of a formula that will calculate the sum of raws in the tables and then will take a # and reduce that sum from it? Thanks
Make is the vastly superior platform to Zapier.I have written up a post on Make vs. Zapier here:https://air.tableforums.com/t/make-vs-zapier/737
steps to reproduce: 1 create a synched table, say Users and create one user 2 in another db add the synched User table 3 create a table, say Exam, that has a field that links to the user 4 verify that you can, from the Exam table, link a user from the synched table 5 from the API call the create method on the Exam table with the field user : [ user-rec-id ] 6 notice you receive an error 422 ‘Record ID user-rec-id does not exist’ expected result: You should be able to create an Exam record from the API with a user linked to the synched User table
Hello everyone, I’m new here. I got an error after I issued the command: block release :x: Error: :x: The base could not be found. Make sure you have access to the base in which this block was created. I have a Creator permission to the base. No problem encountered during development after “block run” command is issued. The custom app can successfully create a new table during testing. But when I issued the command “block release”, the error occurred. Is there anything I missed? block --version 0.0.59 node --version v12.18.3 npm --version 6.14.6 Thank you in advanced.
This question is in continuation of the question I asked here: How to have a script that keeps running in the background or automatically run when i open the table? Scripting app I Want to see the results of all the records in various tables in various bases inside a ‘summary table’ where the status = followup. But I don’t want to click any button to run the script, it should autorun it when I open this summary’ table. How can i make it happen ? With set Timeout or is there a function that will auto run when i open a table ? When i make a change in the “summary table” it should save the changes in the parent table ? or another option could be if i could get a link to the parent table record , upon clicking it opens the original record.
Hi, I’m looking to create a custom view from a table that will display a summary of data for each month. Firstly, I want to select only rows from Table A where the Table B field has the value “Example Value”. Then, I want to calculate certain sums based on subsets of the “Example Value” rows: I want to calculate a “i.e Staff Hours” value for the given month, which is the sum of “hours” multiplied by 8 multiplied by the number of business days in that month. I also want a “i.e Work Hours” field, which is found by taking the sum of hours for rows whose “i.e Work Status” field is not “i.e Full-Time Employee”. I also want a “i.e Senior Staff Hours” field, which is calculated by summing hours for “Table A” where the “i.e Proficiency Level” of Table B is 4, then multiplying by 8, and then multiplying by the number of business days in that month. Is there a way to do a custom view instead of making a script?
Is there a way to use API commands search for a base? Is there a way to use API commands to create a new base from an existing base?
Hey I wanted to automate the process of fetching files from URLs and putting them in a Attachment filed. I found a script to do so at: Setting Attachment URL dynamically Ask the community Hello there, newish to AT, i wonder is there a way to set the URL of the attachment field dynamically using code ? i have used the formula field to build a URL to an image, and i know wish to set the URL of the attachment field to that URL ? doable ? thanks in advance for any help you can offer. Kevin However, the URLs I want to fetch require being logged in into Webflow. So I was wondering if someone knew a method of making sure the URLs are fetching ‘as it was working in your own browser’. In my browser I can simply copy the URLs as I’m automatically logged in to that website. Kind regards Jonas
I wish to find an integer between 1 & 5 in a number field and replace it with a zero (0). The example script gives an error message: “TypeError: originalValue.replace is not a function at main on line 20” I have never programmed a Java script! Please help.
I Want to see the results of all the records in various tables in various bases inside a ‘summary table’ where the status = followup. But I don’t want to click any button to run the script, it should autorun it when I open this summary’ table. How can i make it happen ? With set Timeout or is there a function that will auto run when i open a table ?
So I want more control over a CSV import…what if I don’t want to import all records? What if I want to “rollup” records. Like hypothetically, if I had a say a bunch of transactions on Wednesday but in the CSV each transaction was individual, with a date (Wednesday), amount and location…is there a way to program in javascript to essentially “rollup” all those transactions so I write to airtable a single record, with the date of that record, a total amount from all the records with that date and a field with the locations. Is that possible or should I just build a whole other table to do the rollup? Seems like a time consuming extra step that I could just program in and skip an extra table and time rolling it up. At very least is there a way to “limit” what gets imported?
I can’t seem to release a block that’s based on the unmodified Url Preview example block code. I literally just ran: block init [id] --template=https://github.com/Airtable/blocks-url-preview google_drive_preview “block run” works fine. But when I try to run “block release” here’s what I get: scotty:google_drive_preview scotty$ block release building copying package.json file copying package-lock.json file installing node modules [npm] [npm] > core-js@3.6.5 postinstall /private/var/folders/xb/yhygdpg55d734fcsckghy__m0000gn/T/airtableBlocks/build/1590085769112/transpiled/user/node_modules/core-js [npm] > node -e “try{require(’./postinstall’)}catch(e){}” [npm] [npm] added 78 packages in 1.701s Error: :x: added 78 packages in 1.701s Failed to build the block code!
Hi everyone! I have a particular situation where I’m trying to link several records from a view in one table to a specific view in another. I did some research from pre-existing articles–mainly this one–but I have a couple wrinkles for my script and don’t have the knowledge to make it happen: I work for a non-profit where volunteers go online to write encouraging notes to authors who have sent digital stories to us. In this example base, you’ll see that I have one table for the digital stories, one table for the volunteer events, and one for the companies we work with. Here are the complications: 1) I don’t want to “pack” any stories that were assigned to the same company from a previous event. 2) I want to assign a certain # of stories to the event based on number of attendees. So the script would count the number of attendees, multiply that by, say, 5, and assign that number of stories to the “assigned” field. So in the “Volunteer events” tab, in the “Upcoming Events” view, I have an
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.