Help with SUBSTITUTE - need to append text from another field

Hi all.

Still learning the in’s and out’s of scripting, so please bare with me.

I have a linked field, called {project name} that produces a name based on a formula. The name has the following format:" text1 * text2 " - so two words separated by an " * ". I’d like to append the text and remove everything from the " * ". So the new text would just be “text1”

I can get this far: SUBSTITUTE({Project Name}, “*”, “”) - but this just removes the *, and not all the letters after. I think I’d need to use LEFT or RIGHT in some capacity, but that only looks at letter position?

Could someone please point me in the right direction?
Thanks

Give this a try:
LEFT({project name}, SEARCH(" * ", {project name}) - 1)

That should work if the " * " formatting is always consistent.

1 Like

Amazing! Exactly what I needed. Thanks for the help!

1 Like

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