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

Topic Labels: Scripting extentions
918 1
Showing results for 
Search instead for 
Did you mean: 
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


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)