Help

Need help with trimming

Topic Labels: Scripting extentions
2603 5
cancel
Showing results for 
Search instead for 
Did you mean: 
David_B
5 - Automation Enthusiast
5 - Automation Enthusiast

I have a field for first name and last name where people routinely throw in an extra space after the name so that it will be "john " instead of “john”. I am unfamiliar with js but I would imagine there is an easy script that would trim that last " " off the first name. Help please!

David

5 Replies 5

Yep…

let trimmedName = name.trim();

David_B
5 - Automation Enthusiast
5 - Automation Enthusiast

So if the Name of the Field is First Name, what would I put under the automation script section. Sorry for the silliness of the question

Hi David,

There are no silly questions, especially in software development.

Ahhhh, that’s a very deep discussion and unlikely to remain a mystery answered without a full understanding of the table itself and any actions that occur before the script section.

Unless you acquire some essential understanding of developing in JavaScript, this thread could last well into the Spring. I recommend a quick introduction to Airtable scripting with this video.

Thanks for the intro - watching now. To answer your question, literally no actial will be happening other than a new entry being created in Airtable, which then needs the one field trimmed.

Take a look at this post and the code - it will help you understand what’s required to read fields and write them back changed.