Conditionally formatting a column with different icon images using advanced text mode | Community
Skip to main content
Paul-JD
Level 2
March 28, 2023

Conditionally formatting a column with different icon images using advanced text mode

  • March 28, 2023
  • 2 replies
  • 4060 views

I would like to display a icon in a project report column.

A different icon based on a specifically named project task {status} value.

Below is what I have to display the current status as a string (CPL, INP, NEW, NTA)

 

displayname=Task Status Name
listdelimiter=<div>
listmethod=nested(tasks).lists
textmode=true
type=iterate
valueexpression=IF(CONTAINS("Specific Task Name Part",{name}), {status} )
valueformat=HTML

 

 

The documentation for text-mode links around in circles and is not clear on how to proceed from this point.

I would like to display different icons for each of the different status values.

CPL = /interface/images/v4_redux/icons/casebuilder/flag_green.gif

INP = /interface/images/v4_redux/icons/casebuilder/light_yellow.gif

NEW = /interface/images/v4_redux/icons/casebuilder/light_blue.gif

NTA = /interface/images/v4_redux/icons/casebuilder/light_black.gif

 

 

I've been struggling with how to achieve this for a while now. Any help is appreciated!

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

Madalyn_Destafney
Community Advisor
Community Advisor
March 28, 2023

Hi there! There are icons you can add to columns by using column rules. In a report column you want rules for, in this case your status column, you need to first have a column for status. The click in the column (when you're in edit mode) > advanced options > scroll down and click 'add a column rule' (something along those lines). Then you can add a filter for status = X and opt to have an icon show:

You'll need to create a separate rule for each status/icon. Ordering of column rules can be tricky sometimes, add complete status first, then the other statuses (or whichever you want to pull) below.

If you found this helpful, please mark correct to help others : )

 

If this helped you, please mark correct to help others : )
Paul-JD
Paul-JDAuthor
Level 2
March 28, 2023

Correct me if I am wrong, that is status for the entire project (row of a project report), not for individual tasks within a project.

I want to show the status of several key tasks in a project on a project report.

And I would like to show the status optionally as an icon vs just text.

Madalyn_Destafney
Community Advisor
Community Advisor
March 28, 2023

Yes, this example is for a project report using project status. 

Same concept applies if you want to have a task status column instead of project status. You'd apply column rules using icons on your task status column of your report.

If this helped you, please mark correct to help others : )
Community Advisor
March 28, 2023

Hi Paul,

 

I'm afraid that this isn't possible to achieve natively within Workfront. Conditional formatting doesn't work on value expressions, nor does it work with collections i.e., nested(tasks).lists

 

Conditional formatting can only be applied to a singular value that is stored in Workfront's database. Since value expressions are effectively calculations that happen in the moment when a report is viewed, they are not stored in the database and therefore cannot be formatted. 

 

The only way that I can think of to achieve these use case would be to store the task statuses in custom fields at the project level. The issue with this is that you can't automatically sync these fields to the task statuses without using Workfront Fusion. With the statuses stored in custom fields at the project level, you would then be able to reference them in your project report in separate columns (that are merged into one) and conditionally format as appropriate. 

 

Hope this helps.

 

Best Regards,

Rich. 

quarkmage
Level 3
November 20, 2023

Thank you @richard_le_ -

 

I was working on some advanced formatting and came across this topic and discussion.

You can't do advanced formatting on a calculation, is that correct?

You can only associate advanced formatting with an existing value (i was hoping to do some color coding at task level based on projected completion being less than or greater than due on date, but that does not sound possible).

At a project level, as discussed earlier in the string, you can include project status and do some advanced formatting based on that (like color coding project lines in a report).  

I was hoping to do similar color coding at task level, but options are not the same at task and project level (task condition is not "in trouble", "at risk" or "on time".  similar the condition does not quite match either. i guess progress status is that similar field for a task.  seeing this now as i talk through this post.

 

 

Marco_Donadelli
Level 2
April 10, 2024

Quote: "i was hoping to do some color coding at task level based on projected completion being less than or greater than due on date, but that does not sound possible"

Exactly stuck there!!.
If Anyone has a solution I would be more than glad!

Marco