Need development and API help? Ask your questions here!
Recently active
Hi, I have been trying to add a rich text field and use Markdown Language to create a “Pretty” URL Link Clickme I’ve come to realize, after googling that, it will only work using the API. So, I used Integromat to populate a Rich text field with Clickme in it. The URL is made up fro a concatenated formula ad some of the URL’s have spaces i.e https://www.anywebsite.com/some%20spaces This is not being created correctly when the URL has a space like this. Is there anything I can do? I presumed this would be a quick job, it’s not looking that way :frowning: Any help appreciated Jason
Following up on: Help on Script with Math Function I have a new question. How can I find the record id of a record in a table. Here is my code so far: let table = base.getTable(‘Project List’); let queryResult = await table.selectRecordsAsync(); let record = queryResult.getRecord(queryResult.recordIds[0]); console.log(record) let yearstring = record.getCellValue(‘Year String’) console.log(yearstring) let yeartable = base.getTable(“Year”) let yeartablequery = await table.selectRecordsAsync(); [here I want to add a filter/find function to get record - call it linkedrecord] await table.updateRecordAsync(record.id, {“Year”: linkedrecord}) let year = record.getCellValue(‘Year Count’); console.log(year); let num = parseInt(year)+20018; await table.updateRecordAsync(record.id, {“Project #”: num}) What I want to do is filter/find the record in yeartable by the name yearstring in field ‘Name’. In other words, I have a list of records in yeartable and the Name field is the Year. I want to
I’m trying to move away from Zapier and leverage Airtable Automations, which looks promising as it can detect a new record in a view. We leverage Airtable to do Account & Task Management. With Zapier, we’re able to use Mixpanel to do reporting and analysis about our utilization and operations. When a new task enters a view, send an event to Mixpanel. Using the fetch API in the scripting block, I’m wondering how I’d be able to use Mixpanel’s HTTP spec and hit their /track endpoint. I’m hitting a roadblock because I’m not sure if I can encode the data properly using vanilla javascript. The data parameter accepts a JSON object, either URL encoded or base64 encoded. I’d appreciate any advise on doing this properly. Thanks!
Is there a way to import a csv, and using an ID var replace certain cell values based on the incoming data? For example, the base has 100 records, all with a unique identifier. If I upload a csv of the same data set, with updates fields, can i replace those fields in Airtable without creating dulpicate records?
Any idea why the math isn’t working in my script. I am expecting two numbers to be added together (2+20018 = 20020) but instead get 220018 let table = base.getTable(‘Project List’); let queryResult = await table.selectRecordsAsync(); let record = queryResult.getRecord(queryResult.recordIds[0]); console.log(record) let year = record.getCellValue(‘Year Count’) console.log(year) let num = year+20018 await table.updateRecordAsync(record.id, {“Project #”: num})
I would like to create records en mass. I have 3 tables, Product, Product Request and Campaign. Campaigns require X quantity of Product, which I keep track of in Product Request. I would like a table input method inside the block that looks like this: Product 1 ____ Product 2 ____ Product 3 _12_ Product 4 ____ Product 5 _4__ In this case, the script would run once the table is filled out and create two product request records (12x Product 3 and 4x Product 5). Is this possible?
I am trying to add all records from a view in a separate table to a field for all records in a view on another table. let TBTable = base.getTable(‘Technical Comments for VB’); let TBView = TBTable.getView(“Shared to All Trigger”) let TBQuery = await TBView.selectRecordsAsync(); let TBRecord = TBQuery.records; let VBTable = base.getTable(‘Verifier / Trainer Body’); let VBView = VBTable.getView(“Verifier Bodies (Public List)”) let VBQuery = await VBView.selectRecordsAsync(); let VBRecords = VBQuery.records; let d = VBRecords.forEach(c => d.push({id: c.id})); await TBTable.updateRecordAsync(TBRecord.id,{‘Verifier Body’: d}); output.markdown(’# Done :rocket: ’) I am getting an error that the record is not defined. Can someone help? Thanks,
Hi Folks, This may Seem a bit silly but I’m trying to render just individual field information for a little project I’m working on. I can get all the fields and cells for all the fields to show in my block but I can’t break it down enough to get just a single field worth of data. Please take a look and see if you can help
I’m using the automations feature in Airtable. One field is not auto-populating when the process is triggered. I’ve also noticed that multi-select and linked records cannot be used for automations. Is there a way around this?
Hi y’all! The Cursor API is now accessible within the scripting block. You can use it to access the currently active table ID and view ID. This is particularly useful for removing the need for your users to manually select tables and views while running a script. Learn more about how to use it in our scripting block API documentation. Hope you all enjoy the new feature; happy scripting!
Hi, Airtable - Support Prefilling a form When making an Airtable form, you can use prefill_ parameters in the URL of the form to prefill specific fields. Find the URL for the form you wish to prefill. Once you get the form URL, you can ... I am using the prefill feature to create 3 different links for 3 different webflow pages. On each page i prefill a single-select field with the page-name. Eg. “project_one”, “project_two”, etc… Within airtable i open the “embed view” and copy the code. Then i add my “?prefill_ProjectName=project_one” code. After that within webflow i use the HTML-Embed element to paste the shared link into. Example embed code before: <script src="https://static.airtable.com/js/embed/embed_snippet_v1.js"></script><iframe class="airtable-embed airtable-dynamic-height" src="https://airtable.com/embed/shrbasdada21212?backgroundColor=cyan" frameborder="0" onmousewheel="" width="100%" height="979" sty
I just wanted to give miniExtensions a shout-out! Working their new portal designs and ability to have customers/employees edit records. I had a few feature requests (colored buttons, ability to remove back button, have buttons open in same window vs opening new, etc.) and less than 24hrs later they were all implemented :grinning: Who does that??? Their customer service is top notch! Their extensions have come a long way in the last few weeks and you get a lot for the price. (I am not affiliated with them in any way). miniExtensions Integrations and Tools for Airtable - miniExtensions Add new features to Airtable. Process unlimited records in bulk with scheduling and automation. An alternative to Zapier and Integromat
Hi, is there a way to increment a number field via the API ? Something like: base(‘Variants’).update([ { id:id, fields:[ my_number_field: increment(1) ] } ]) I would like use the API to perfom an update without pulling the previous value first.
I often have to look up old conversion rates and match them to items that was paid at a specific dates. I’ve been playing around with the scripting block and been trying to figure out if I can get a drop-down calendar in my block, however it seems not possible atm. For now I’m thinking I want to be able to pass an input string, have that to lookup historic currency rates. However I’m alittle stuck on getting to grips with how to format dates. I would have thought the below would send me the input date, however I get nothing atm. let table = base.getTable('Match currency to date') let date = await input.textAsync('Choose a date you want to look up') let checkDate = new Date(date); console.log(checkDate.getDate)
I’m currently trying to build a filter into my Block where I: I populate the Select (UI Component) options with data from multipleRecordLinks Field cells on all the Records in the table Capture that option onChange. Use that option to filter for only the Records that contain that option in their multipleRecordLinks cell. Is there a way to extract all of a Field’s related cell values through the Field class or do we have to get cell values through the Records class or Record hooks?
Is there a way that I can copy a word or words from a URL in any given record and paste it into another field on the same table? If so, what would that script look like? I have a table full of records each having their own link to a specific URL (none are the same). Each link opens up a specific record on another database made to match. Within each record in this linked database (which is not airtable btw) is a place called “Contractor or Supplier” about halfway down the page where, directly next to it, is the name of a contractor or supplier. I need to know if there is a way I can have it look in that link, grab the name of the contractor or supplier, and paste that name into a “Link to another record” field within the same table.
this is my table https://api.airtable.com/v0/app7MvgC7cKX7Zq7n/student?filterByFormula=class="2"&sex="male"
Hi all! I’ve installed the blocks-cli through node, but when I try and run it (for example the command to set up a hello world block, but also just running ‘block’ on its own) I get the following error: /usr/local/lib/node_modules/@airtable/blocks-cli/node_modules/update-notifier/index.js:74 (async () => { ^ SyntaxError: Unexpected token ( at createScript (vm.js:56:10) at Object.runInThisContext (vm.js:97:10) at Module._compile (module.js:542:28) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3) at Module.require (module.js:497:17) at require (internal/module.js:20:19) at Object.<anonymous> (/usr/local/lib/node_modules/@airtable/blocks-cli/transpiled/src/run_block_cli_async.js:215:454) Could anyone shed some light on how I might be able to resolve this? Thank you! Tom
Hi, I have a field which I can see in API documentation for the table. https://airtable.com/{app_id}/api/docs#curl/table:{table_name}:fields I don’t see the field in rest of the docs (list/retrieve/create/update). I don’t get the field in the API response either when I’m trying to list records. Table name is 110 characters long, is Single select, string. I’m wondering if the length of the field name is the reasoning of the missing field. I would like to know what to do to get the field in API response.
How Do I Integrate and Upload a Company’s Competitors Info Data From Craft, Owler, Bloomberg or etc? Thanks for taking the time to help!
I have a script I run that manages task due dates. Using self linked table to setup predecessor tasks with manual start date and manual lead time fields, it calculates the end due date. The script pulls the predecessors end date and checks if the task start date matches or not. If not it will change the start date. My problem is right now is that when I press the button to run the script, it runs through the script once, showing me a result of all the tasks/dates it updated. Because at the time of running the script these are the only dates it found mismatching. But as a result of these updates, I have to run the script again to update any further tasks/dates that were affected. Then again and again until there is no more dates needing to update. What I want to do is have the script pause at the end, then run the script again on its own. I want it to continue this loop until there is really no more tasks/dates to update. Is there any way to do this?
Hello, I’ve been working with a script for a while to import some CSVs. The purpose of doing this is to cleanse some of the data prior to importing it and adding more controls around how these files are uploaded verses using the CSV import block which we can’t control as well. A question I had was, that when I try to import one of my files that contains a 16 digit tracking number, it comes in formatted as scientific notation and loses any data beyond where it is summarized. I understand that this is often regarded as an Excel issue, and there are workaround within Excel, but when I try those workarounds, save the file, and try to import it, I still get scientific notation formatted numbers. I was wondering if anyone had a potential solution to this or if anyone has run into similar issues. My current solve would be mapping where we currently get our data from, to an Excel file, and using the scripting import on an .xlsx file type instead but we would really prefer to have them stay in
How to get the modification time of a table item (in Kanban)? Example: You need to get what is highlighted with a green line (Using the API)
I have a table with 8,000+ records that include email addresses (source table). I have a list of 200~ e-mail addresses being updated manually (table 2). I would like to create a grid view in the source table that filters to only include the list of 200 e-mail addresses, without having to manually search for each or create a filter. The end result being that my source table has a column that indicates if the record’s email exists in Table 2, and I could create the grid view based on this. Anyone know if a script exists for this? Originally asked the question here: Filter for a long list of values
Hello, I’ve posted a related discussion to this one, wondering if there was any way, through the scripting block, I could break out numbers that were in scientific notation into long strings from .csv files that I was importing. Unfortunately, none of my potential solutions worked out. I’ve started trying to figure out at what point these files get converted to scientific notation. When I view the .csv as text, I can see the long numbers as I would expect them to be uploaded. But when I upload the file via the scripting block, they are formatted in scientific notation. This is starting to make me think that the parsedContents function takes some liberties with the data and converting it. While it is tremendously helpful for a lot of my purposes this is a roadblock I’m not sure how to get passed yet. My question would be whether or not there is a way to prevent the automatic file parsing in the scripting block from changing my fields and data? If there were some way that the file could
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.