Help

Should my first script be a badging system?

Topic Labels: Scripting extentions
95 2
cancel
Showing results for 
Search instead for 
Did you mean: 

I’m trying to create a basic badging award system for volunteers as they progress within an outreach program. And I’m wondering if I’ve finally reached the point where I need to learn JavaScript to do what I want in Airtable.

The Basics:
Match Log table contains all instances in which a volunteer signs up for a workshop. Using pivot table extension I can see each volunteer by row and a count of each workshop that a volunteer has led. The visualization is useful but I want to use the values stored in pivot table to trigger other actions e.g. assigning a badge if certain conditions are met. Doing it manually is a real pain.

Would the below be a reasonable approach to writing a script? Is this achievable for a semi-savvy newb? Or should I look to hire a consultant?

Loop through each volunteer

Loop through each workshop, return count value

Assess each value against condition(s)

IF condition == True then create a link to Badge table

I should also say I’ve posted the same question elsewhere on Airtable: Badge system w/in training program - #7 by Matthew_Chattwood

@Adam_TheTimeSavingCo used Count fields and a nice formula to get me partway there without me needing to learn JavaScript. I’m posting a second time to try and get a sense of whether or not a script is a better long term option.

I’m happy to post images of tables if it’s helpful or provide further info about base.

Thanks very much.
Alex

2 Replies 2

Makes me think you have some scripting knowledge :slightly_smiling_face:

If you have the gumption for it, then yes this is a fine place to start learning. You may want to start with understanding how some of the example scripts work and how to navigate Airtable’s schema.

However, in just reading this post it sounds like you can accomplish all of this with only automations and formulas. As far as “get a sense of whether or not a script is a better long term option” well, that is hard to say. Will you be the one maintaining the Base forever or will you hand it off to someone? Will that person be able to maintain your script? Airtable like any software is subject to changing, your script may require rework at some point to adjust to the changes. Whereas using native tools you are somewhat less likely to be pinched with changes. Scripting has other nuances, if you write a script that references a table name and someone changes the name of the table your script may fail until it is updated.

Overall, I say go for it, at least you are learning. Break it down, get one part working and then move to the next part.

I echo Vivid-Squid’s sentiments.

If you are interested in scripting, I recommend learning it. Being able to write scripts is very empowering in Airtable. While many things can be done without scripts, having the option to choose between a script and a non-scripting workflow lets you choose the best option for your situation. And there are always things that cannot be done without scripts.

Should you choose to learn scripting, I do not recommend this as a first script. I recommend starting with smaller scripts specifically designed to guide you through the learning process. Learn how to read and write cell values for various different field types. Learn how to update records in batches. Learn how to do looping and branching in JavaScript. Then try to put the pieces together to attempt this particular script.