![]() The migration to Airtable also involved creating automation to handle the form submissions. Having an individual view made it easy for my team to go in, view the project, leave their thoughts, and vote. For every member of the team, I created a view that would list all the submissions that they haven’t viewed. All of us decide if a submission should be added to the Developer Showcase. I created a base in Airtable for the Developer Showcase which would contain all the details - from the initial form submission details to the final details.Įveryone in the DevRel team is involved in the showcase. Luckily for me, we already use Airtable at Contentful for various projects. I was looking for a tool that would allow me to easily create automation workflows, configure different views, and also have an easy-to-use API. My first step was to migrate to a spreadsheet-like tool that provided better features than Google Sheets. Now that I recognized two tasks that could be automated, I started looking for solutions. I take pride in being lazy! My laziness helps me find solutions that make my tasks joyful. There were situations where I would enter the information in the wrong columns when I was in a hurry. I recognized this as another task that could be automated.īoth the tasks were manual, which meant that the chances of human error were high. We had to manually add the relevant information shared via the form to the Contentful space. Let myRecords = await emailTable.The above process was also manual. man I miss being able to use emoji!) const emailTable = base.getTable("Emails") My code snippet below (I hope I don't break the forums. It's basically letting any true statement through the gates, which in our case is a subsequent mapped object used to update up to 50 records. Once you understand filter, you'll realise it's kind-of-like an "if"statement. ![]() I usually can tell when I'm working with my old code, because I always forgot about this in my early days of scripting.ĭestructuring is also great for taking the first element held within an array of records, be it either an id or a record object. This method assigns the values directly to your named variables in one simple line. Let myRecords = await lectRecordsAsync( = nfig() Using the scripting app - I think a working solution may look something like this Ĭonst emailTable = base.getTable("Emails") Sometimes it's worth working out the logic in a simpler environment - in that, before trying to get your script working within Automation, try out some logic in the Scripting Extension before hand. Loop through the actual record objects to get the email values, check for nulls, and perform the updates. Query for the actual record objects with those record IDsģ. Get the records IDs as an input variable.Ģ. It also looks like you are trying to cross-reference the emails and record IDs in your input variables. Are you trying to get the value of the "email" input variable? The word "Email" is not the actual email of of a record. Your "if" condition is testing the hardcoded text string "Email", the literal word "Email", which is always a truthy value. This bit of code is part of your problem. Please forgive the formatting of this post. For example, little things like quoting specific pieces of your message is now incredibly difficult. Unfortunately the new community platform has made it impossible for me to participate with the community the way I have. > I have seen you around forum posts patiently teaching others about understanding and utilizing Airtable script (which has been tremendously helpful btw so thank you for what you do!), so I thought you may know the answer to this. ![]() I have seen you around forum posts patiently teaching others about understanding and utilizing Airtable script (which has been tremendously helpful btw so thank you for what you do!), so I thought you may know the answer to this. ![]() What am I doing wrong or what am I missing? In this example below, I am trying to do a simple null check to check if NOT BLANK then run through the for loop to update those blank fields with an "Undefined" text, but it always seem to replace all records even when a record already have text in it. I am currently struggling to combine a typical "If conditional statement" with a "for loop." I recently decided to take the leap to level up how I use Airtable by taking baby steps to use Airtable script to accomplish more complex tasks, especially in Airtable Automations. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |