I am trying to format words within a string depending on if that word exists in a table column. For example, if I have the following in an HtmlText:
Hello world, my name is X
And I have the single-column table:
Result --------- Bob Drew X name
How can I get my string to show up as:
"Hello world, my name is X"
I've tried doing something with Substitute() and Filter(), but I have not been able to achieve anything. Any help is appreciated
Solved! Go to Solution.
"Hello world, my <font color="&If("X" in NamesList,"Red","Black")&">name</font> is <font color="&If("X" in NamesList,"Red","Black")&">X</font>"
Hope this Helps!
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
That would work, except the string is dependent on a variable. If I had a variable sentence, I would not be able to hard code the font colors in html as every word in sentence would be constantly changing. I hope that makes sense.
Is there a way to possibly loop through all the words in the string using ForAll() or something similar?
Continue your learning in our online communities.
Features releasing from October 2019 through March 2020
Coming to a city near you
Fill out a quick form to claim your user group badge now!
Connect, share, and learn with your peers year-round
Register by September 5 to save $200