Save the date! Join us on October 16 for our Product Ops launch event. Register here.
Jan 22, 2021 06:32 AM
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
Jan 22, 2021 06:37 AM
Yep…
let trimmedName = name.trim();
Jan 22, 2021 06:56 AM
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
Jan 22, 2021 07:09 AM
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.
Jan 22, 2021 07:26 AM
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.
Jan 22, 2021 07:36 AM
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.