Script to get the first nine characters of a field

I’m hoping to get the first 9 characters of a record into another field. Id normally just make the field into a formula and use Left({product},9) but the rest of the automation wont run on the formula field.

Please help.

In javascript you’d do: variableName.substring(0, 8)

https://www.w3schools.com/jsref/jsref_substring.asp

1 Like

Another option is to use an “Update record” action to copy the result from the formula field to a single line text field, then use that value later in the automation.

1 Like

Thanks Justin, that worked a treat.

1 Like

Glad to know that you got the answer you were seeking! If you would, please mark my comment (the one above, not this one) as the solution to your question. This helps others who may be searching with similar questions. Thanks!

This topic was solved and automatically closed 3 days after the last reply. New replies are no longer allowed.