Expand my Community achievements bar.

Join us LIVE in San Francisco on November 14th for Experience Makers The Skill Exchange. Don't miss out on this free learning event!

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

Avatar

Level 2

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!

19 Replies

Avatar

Community Advisor

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:

Madalyn_Destafney_0-1680028072376.png

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 : )

Avatar

Level 2

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.

Avatar

Community Advisor

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 : )

Avatar

Level 2

I am not seeing on a project report, adding a column, where/how to reference a specifically named task status in the advanced view for assigning icons.

Or in the normal column view.

 

Avatar

Level 2

To clarify, I want to show status from a specifically named task within a project... on a project report. Not in a projects task list view.

 

Avatar

Level 2

Screenshot 2023-03-28 140655.jpg

Here is a screenshot of an example... The project report has an overall project status... but i can pull in the status of a individual task within the project as text with valueexpression. However I'd like to show an icon instead of text based on the tasks status.

Avatar

Community Advisor

Hmm, I haven't pulled in a task status column into a project report bc I think I'd find that misleading. What you could try is adding column/rules in a task report, change the view of it to text mode, and grab the relevant text mode to pull into the text mode of your project report alongside the other text mode you need and make tweaks as needed. 

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

Avatar

Level 2

As you mentioned.... I am trying to pull the data in and modify as needed.

The documentation on text mode is quite lacking and not clear on why/how things work.

This is the heart of my question. How to pull the values in text mode and display icons conditionally based on found values.

 

Avatar

Community Advisor

I understand what you're saying. What I'm suggesting to help is to create status rules in standard mode on a dummy task status column on a task report (which you'll then delete), change from standard to text mode so you can see how WF translates the rules to text mode. Then copy that text mode into your project report to try to tweak as needed from there. 

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

Avatar

Level 2

Yes. 

I have attempted that. With no success as the example of showing/comparing a project status doesn't seem to work the same way when trying to select a task by name.

The only way I have been able to get task status... is using listmethod and type = iterate.

-------------------------------------

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

 

 

And building a custom advanced project status column, it is unclear through the generated text mode data and the documentation how it could reference the specific task status values.

-------------------------------------

valuefield=status
querysort=status
valueformat=val
displayname=
enumclass=com.attask.common.constants.ProjectStatusEnum
enumtype=PROJ
type=enum
linkedname=direct
namekey=status
image.case.0.comparison.leftmethod=status
image.case.0.comparison.lefttext=status
image.case.0.comparison.righttext=CUR
image.case.0.comparison.operator=in
image.case.0.comparison.operatortype=string
image.case.0.comparison.icon=true
image.case.0.comparison.truetext=/static/img/r15/icons/casebuilder/light_yellow.gif
image.case.1.comparison.leftmethod=status
image.case.1.comparison.lefttext=status
image.case.1.comparison.righttext=CPL
image.case.1.comparison.operator=in
image.case.1.comparison.operatortype=string
image.case.1.comparison.icon=true
image.case.1.comparison.truetext=/static/img/r15/icons/casebuilder/flag_green.gif

 

 

I will keep trying. But this is what I am asking for help with.

Avatar

Community Advisor

If you're wanting a report focused on tasks and include a column for task status, you need to create either a task report or an assignment report (pulls tasks and issues). You cannot add a column for task status in a project report. You can group the tasks by project name or add a column for project name, but you need a task report for what you're looking for.

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

Avatar

Level 2

Only individual tasks within a project in a project report.

Using Text Mode I can pull the status as text, but I am wanting to figure out how to show an icon instead for each of the status values.

Avatar

Level 2

@Madalyn_Destafney  is there a way to use different icon images in place of the system supplied icons? I have tried a solution that I found in a different post, but that solution was posted 8 years ago and no longer appears to work.

Avatar

Community Advisor

Hi there, I'm not aware of any way to code in custom icons aside from what is provided out of the box.

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

Avatar

Community Advisor

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. 

Avatar

Level 3

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.

 

 

Avatar

Level 2

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

Avatar

Community Advisor

 

Late to the party, but now caught up, so...

 

  • @MarcoDona and @quarkmage you might find some inspiration in this article by @jon_chen
  • @Paul-JD and @Richard_Le_ I understand what you're seeking and asserting, respectively (and suspect I agree), but am going to mull this over for a native workaround anyways. In the meantime, invite you to consider our Magic Reports solution, which -- albeit admittedly cheating -- could easily meet these requirements, in a fashion similar to our Hot Sheet solution (among others).

Regards,

Doug