I am working on a Project Report that displays the current tasks being worked on in a column but I need to exclude certain task names. I am working in text mode. Is this possible? | Community
Skip to main content
Level 2
December 7, 2021
Solved

I am working on a Project Report that displays the current tasks being worked on in a column but I need to exclude certain task names. I am working in text mode. Is this possible?

  • December 7, 2021
  • 2 replies
  • 1143 views

Hi All - I am working on a Project Report that displays the current tasks being worked on. The issue is that I have some "Oversight" tasks that last the full duration of the project that I want to exclude from this column. All 4 tasks contain "Oversight" so I would just need to exclude anything that contains "Oversight". This works in standard mode but not in text mode for me. Does anyone know if this is possible? If so, could you help provide direction? I am using the html text mode below.

displayname=Current Task

listdelimiter=

listmethod=nested(tasks).lists

textmode=true

type=iterate

valueexpression=IF({numberOfChildren}=0,IF({canStart},IF(CONTAINS("CPL",{status}),"",CONCAT({name}," "))))

valueformat=HTML

Thank you in advance!

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

Hi Laura!

This valueexpression should work to exclude tasks with the name "Oversight":

valueexpression=IF(CONTAINS("Oversight",{name}),"",IF({numberOfChildren}=0,IF({canStart},IF(CONTAINS("CPL",{status}),"",CONCAT({name}," "))))

-----------

I did just want to mention - the code you provided (and that I copied into my response) is going to show you more than just the "Current" tasks - it's going to show you anything that has is Can Start = True and in a status other than "CPL". So if you use statuses for "Cancelled", those tasks are still going to show up on your list. I'd recommend trying this formula instead:

valueexpression=IF(CONTAINS("Oversight",{name}),"",IF({numberOfChildren}=0,IF({canStart},IF(ISBLANK({actualCompletionDate}),CONCAT({name}," "),""))))

-----------

Also, the formula right now will provide your list of applicable tasks, separated by 2 spaces (that's what the CONCAT() portion of the formula is doing). On our reports, we always find it helpful to either put a pipe (|) between the task names OR we create line breaks.

If you want to do the pipe, it would be CONCAT({name}," | "). If you want to do line breaks, you would need to change your listdelimiter= to listdelimiter=<br>

2 replies

ChloeRoAccepted solution
Level 4
December 7, 2021

Hi Laura!

This valueexpression should work to exclude tasks with the name "Oversight":

valueexpression=IF(CONTAINS("Oversight",{name}),"",IF({numberOfChildren}=0,IF({canStart},IF(CONTAINS("CPL",{status}),"",CONCAT({name}," "))))

-----------

I did just want to mention - the code you provided (and that I copied into my response) is going to show you more than just the "Current" tasks - it's going to show you anything that has is Can Start = True and in a status other than "CPL". So if you use statuses for "Cancelled", those tasks are still going to show up on your list. I'd recommend trying this formula instead:

valueexpression=IF(CONTAINS("Oversight",{name}),"",IF({numberOfChildren}=0,IF({canStart},IF(ISBLANK({actualCompletionDate}),CONCAT({name}," "),""))))

-----------

Also, the formula right now will provide your list of applicable tasks, separated by 2 spaces (that's what the CONCAT() portion of the formula is doing). On our reports, we always find it helpful to either put a pipe (|) between the task names OR we create line breaks.

If you want to do the pipe, it would be CONCAT({name}," | "). If you want to do line breaks, you would need to change your listdelimiter= to listdelimiter=<br>

Level 2
December 7, 2021

That worked!! Thank you so much Chloe!

Just curious, if I need to exclude more than just "Oversight", is that possible?

Level 4
December 7, 2021

Yup, that's possible. For example, f the task will contain the text "Oversight Task", then you can just add that into the existing formula CONTAINS("Oversight Task",{name}).

If you need a separate keyword, I'd recommend building it as an "OR" (in a valueexpression, you can build an "OR" statement with a double pipe (||)). So if I wanted to exclude tasks that contained "Oversight" or "Sample Text", the formula would look like this:

valueexpression=IF(CONTAINS("Oversight",{name})||CONTAINS("Sample Text",{name}),"",IF({numberOfChildren}=0,IF({canStart},IF(ISBLANK({actualCompletionDate}),CONCAT({name}," "),""))))

Level 2
December 7, 2021

Amazing! Thank you SO much for your quick, helpful and educational response!