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?
Check it out!
Check it out!
Fill out a quick form to claim your user group badge now!
Find out where you can attend!
Features releasing from October 2019 through March 2020
The largest Power BI, Power Platform, and Data conference in New Zealand