Help

The Airtable Community will undergo scheduled maintenance on September 17 from 10:00 PM PST to 11:15 PM PST. During this period, you may experience temporary disruptions. We apologize for any inconvenience and appreciate your understanding.

Needing to copy and paste one field record into an empty column, and replace all instances of " " with "-"

Topic Labels: Scripting extentions
1136 1
cancel
Showing results for 
Search instead for 
Did you mean: 
Christopher_Hac
4 - Data Explorer
4 - Data Explorer

Hey everyone! I’m trying to create a script that will read whatever content is placed into the first column “Product Title” and create a url handle out of it. I’m just looking for it to copy whatever record is under “Product Title” to “Handle” and replace all instances of spaces with “-” instead. Thanks so much!

1 Reply 1

Hi,

use formula SUBSTITUTE(“Products title”, " ", “-”).
then turn formula field in Text(if needed)

or (if exactly script needed) use mine from here, change field names, add replacement to
rec.getCellValue(‘ source ’)

rec.getCellValue(‘ source ’).replace (/ /g,"_");
(g means all occurencies)