Mar 06, 2023 12:47 PM
I have a column {Sentence with Plain Value}, whenever a value that is listed in column {Plain Value} exists, I want it replaced with the value in column {Value with R Ball} and outputted with other initial values in the sentence.
For example:
I love to have a Big Breakfast will be -> I love to have a Big Breakfast®
A Burger is delicious -> A Burger® is delicious
How can I accomplish this?
Mar 06, 2023 03:00 PM - edited Mar 06, 2023 03:09 PM
Hey @junaid2ali!
You don't actually need the Value with R Ball field at all to do this.
Create a new formula field and give this formula a shot:
IF(
AND(
{Plain Value}, {Sentence with Plain Value}
),
IF(
FIND(
{Plain Value}, {Sentence with Plain Value}
),
SUBSTITUTE(
{Sentence with Plain Value}, {Plain Value}, {Plain Value} & "®"
),
{Sentence with Plain Value}
),
{Sentence with Plain Value}
)
You'll want to double check that all the field names and values are correct if it throws you an error.
Mar 06, 2023 03:08 PM - edited Mar 06, 2023 03:10 PM
Hi @junaid2ali,
You can also accomplish this by using the SUBSTITUTE Formula. Try this:
Mar 07, 2023 11:41 AM
Thanks for this, but this solution assumes the R ball is always at the end correct? which is not the case.
Mar 07, 2023 11:44 AM
IF(
AND(
{Plain Value}, {Sentence with Plain Value}, {Value With R Ball}
),
IF(
FIND(
{Plain Value}, {Sentence with Plain Value}
),
SUBSTITUTE(
{Sentence with Plain Value}, {Plain Value}, {Value With R Ball}
),
{Sentence with Plain Value}
),
{Sentence with Plain Value}
)