Help

Re: Running Field Tweaker as part of an automation

3347 2
cancel
Showing results for 
Search instead for 
Did you mean: 
Jacob_Sessions
5 - Automation Enthusiast
5 - Automation Enthusiast

Hello,

I am trying to figure out how to run the Field Tweaker scripting app whenever a record is created on a particular table. I have the app working successfully manually but I have not been able to figure it out thus far as part of an automation. I am assuming the code has to be changed slightly to reflect which field I want to tweak and what case but I am not sure if there is anything else I am going to need to do.

Any help or pointers would be greatly appreciated!

6 Replies 6

The Field Tweaker script was written before scripts could be run in automations. It was also designed to alter multiple records at once, not just one record. Enough of the script would need to be changed (either added, removed, or altered) that you might be better off starting from scratch.

Do you have experience writing code and what is your interest level in learning how to write Airtable scripts? If you want to learn to write Airtable scripts, this could be a good beginner project.

Jacob_Sessions
5 - Automation Enthusiast
5 - Automation Enthusiast

Ah okay that makes sense.

I do not really have any experience writing code I have mostly been copying and pasting but I am reaching the limit of the effectiveness of that strategy and am in a position where I am needing to be able to do more. So my interest level is high for sure.

Awesome!

Learning to write Airtable scripts involves (1) learning JavaScript, (2) learning the Airtable Scripting API, (3) knowing how to break down your tasks into smaller and smaller units until they match JavaScript and/or Airtable Scripting functions, and (4) debugging.

I recommend using Scripting App (versus Automation scripts) to start out because dealing with input/output is much easier in Scripting App. I also recommend starting your script with a completely blank script for your learning process and adding on from there, versus starting with an existing script written by someone else.

Stage 1:
Start by writing a script that can input a record, save the current cell value for the field to a variable, and then output the value of the variable. Since this will eventually be an automation script, use console.log() for your output for now. You will also want variables for the table and the record.

Stage 2:
Then add code to that script that tweaks the value of the variable as you want. You might be able to copy a couple of lines from the original script for this. Output the tweaked value using console.log()

Stage 3:
Add code to the script to update the original record with the new value.

Stage 4:
Finally, convert the script to work as an automation script. You will need to learn automation input variables and how to get the record values from the input variable.

Rickileigh_Edwa
5 - Automation Enthusiast
5 - Automation Enthusiast

Hello,

Did you manage to write this script for your automation?
I’m looking to do the exact same thing I reckon, would you be open to sharing your code?

Thanks!

Rickileigh,

I was not able to figure it out unfortunately. I have opted to run it manually for now.

If you’re looking to title case your things try this in your fomula field: We still need a simple TITLE CASE (PROPER) function alongside UPPER and LOWER - #6 by gxjansen