Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Bolding specific text

jhealyande001
5 - Atom

Hi - 

 

I am trying to use the following formula, but cannot figure out what is wrong with it. I am trying to get specific text bolded red.

 

IFF(Contains([Wording], "[Text I want bolded red]"), Replace([Wording], [Wording],<b>"[Text I want bolded red]"</b>),[Wording])

 

Any help would be awesome

6 REPLIES 6
KaneG
Alteryx Alumni (Retired)

Hi @jhealyande001,

 

Change IFF to IIF, it stands for If & only If, there are also multiple extra parameters in the Replace formula.

 

The below is if you have a field named 'Wording' and a field named 'Text I want bolded red' and will put in the required html tags to bold that text. Of course, you would need to render it out to HTML for it to actually be made bold, but you can check it in the Browse Visualytics.

 

IIF(Contains([Wording], [Text I want bolded red]), Replace([Wording],[Text I want bolded red],"<b>" + [Text I want bolded red] + "</b>"),[Wording])

 

I've attached an example for you to look at

jhealyande001
5 - Atom

Thank you. I am trying to write a table into an email file, so am using the "build table for email" function. I am looking to take specific text in the table and change it to red or bold it. Using a column rule on my field [Wording], I can get all the text in the cell table to change red. What I am trying to do is get only specific text to change to red. I might be confusing HTML coding with Alteryx. I am not writing to HTML.

 

My text I want to make red is a specific phrase eg "text I want to bold",  so I was trying to use the contains/replace as a way to do this, but perhaps I am other thinking it. Is there another way?

KaneG
Alteryx Alumni (Retired)

If you are trying to get part of a cell bold or a different colour instead of the whole cell, then that's not going to happen without rendering to HTML.

 

You can however affect whole individual cells by setting a Row rule on a field in the table

David_Doyle
7 - Meteor

Do you have any resources on how to make this happen with rendering to HTML? I have researched this extensively and cannot locate what I need, or at least it's not making since in my head how to achieve. I have attached essentially what I'm trying to accomplish. I have a reference table that has the categories in it and I'm trying to color those specific categories within the cell to make it easier for the user to see. There will be a lot of text in one cell so this makes it quicker for the user to see which categories are tied to each person.

KaneG
Alteryx Alumni (Retired)

If you render to HTML, then you are not rendering to an Excel file. You won't be able to render the HTML into an Excel Cell. I think your solution with the Conditional formatting setup is probably going to be your best option.

David_Doyle
7 - Meteor

Thanks for the quick reply! I'll just continue to use the multi-row tool and have a script execute after the fact to fulfill my needs.

 

Thanks again!

David

Labels