Expand my Community achievements bar.

Latest Community Ideas Review is Out: Discover What’s New and What to Expect!
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?

Avatar

Level 2

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!

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Level 4

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>

View solution in original post

5 Replies

Avatar

Correct answer by
Level 4

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>

Avatar

Level 2

That worked!! Thank you so much Chloe!

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

Avatar

Level 4

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}," "),""))))

Avatar

Level 2

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

Avatar

Level 3

Hi Chloe

I hope you can help. Im trying to use the same expression (below) but I want to search for task names regardless of case sensitivity. Is this possible? I've gone through a lot of articles but haven't found an answer.

valueexpression=IF(CONTAINS("File to Requestor",{name}),{plannedCompletionDate})

Thanks in advance!

Lukasz