Skip to main content
Solved

Help with SUBSTITUTE - need to append text from another field

  • October 14, 2020
  • 2 replies
  • 22 views

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

Best answer by Nick_Dennis

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

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

2 replies

Forum|alt.badge.img+14
  • Participating Frequently
  • Answer
  • October 14, 2020

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

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


  • Author
  • Participating Frequently
  • October 14, 2020

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

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


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