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!
SOLVED

Filter out specific parent task using valueexpression

Avatar

Level 2

Hi! I'd like to filter out a specific parent task from showing in a report. However, a filter is not working now that I've combined all tasks into one field. Anyone know how I might manipulate the valueexpression for the Project Tasks + Due Date column to also NOT CONTAIN "Fusion - Asset Inventory" parent task? Thanks in advance! New to using text mode!

 

displayname=Project Tasks + Due Date
listdelimiter=<p>
listmethod=nested(tasks).lists
textmode=true
type=iterate
valueexpression=IF(CONTAINS('Asset:',{name})=true," ",CONCAT({plannedCompletionDate}," - ",{name}))
valueformat=HTML

 

ColleenKl_0-1709671333101.png

Topics

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

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

I just looked at your task list you posted and see that it would filter out additional items in the milestones below so I would do 2 IF statements combined.

 

Try this:

 

IF(CONTAINS('Asset:',{name})," ",IF(CONTAINS('Fusion - Asset Inventory',{name}),"",CONCAT({plannedCompletionDate}," - ",{name})))




View solution in original post

16 Replies

Avatar

Community Advisor

HI @ColleenKl - You don't need the "= true" after the contains statement. 

 

CONTAINS(findText, withinText)

 

See if this works:

IF(CONTAINS('Asset:',{name})," ",CONCAT({plannedCompletionDate}," - ",{name}))




Avatar

Level 2

hey Kellie!
I need to keep the "Asset" statement in there b/c it's differentiating the two different task types we have - project column does NOT contain tasks with "Asset:" but the Asset Task column does. I want to also remove the "Fusion - Asset Inventory" parent task from what's showing in the project column, however. Does that make sense?

Avatar

Community Advisor

Hi Colleen - To clarify, the code you posted above in your question works fine you just want new code that will remove only the task labeled "Fusion - Asset Inventory" from what displays in the column project tasks + Due date? 

 

You can change the formula to just an if statement.

 

IF({name}="Fusion - Asset Inventory","",CONCAT({plannedCompletionDate}," - ", {name}))

 




Avatar

Level 2

Almost - I don't want the list to display:

- tasks named "Fusion - Asset Inventory" OR
- tasks that include "Asset:"

Avatar

Community Advisor

 

Then you should stick with your original code and remove the =true as mentioned above as it's not needed for a Contains statement.

 

IF(CONTAINS('Asset:',{name})," ",CONCAT({plannedCompletionDate}," - ",{name}))

 

This will not show any task where the name contains the word "asset" in any fashion.




Avatar

Level 2

Sorry @KellieGardner apparently i'm not being very clear

 

This works in the project task column:
valueexpression=IF(CONTAINS('Asset:',{name})=true," ",CONCAT({plannedCompletionDate}," - ",{name}))

 

This works in the asset task column:

valueexpression=IF(CONTAINS('Asset:',{name})=false," ",CONCAT({plannedCompletionDate}," - ",{name}))

 

For the project task column though, I want to ALSO filter out the parent task "Fusion - Asset Inventory" as it is not a "real" task assigned to anyone. It only holds all of our digital marketing asset tasks under it in the Task list of the project.

 

So the project task column shows all project milestones, and the asset task column shows all of the Asset Inventory from issues created within the project that have been converted to tasks. (see screen grab!)

ColleenKl_0-1709679054268.png

 

 

Avatar

Community Advisor

Did you try using the code I gave and it's still not giving you the results you want?




Avatar

Level 2

Correct - when I removed the "true" from the formula, the "Fusion - Asset Inventory" task was still showing in the Project Task column.

Avatar

Community Advisor

It looks like you would also need to remove the : as well since the parent task isn't formatted as "Asset:"

 

IF(CONTAINS('Asset',{name})," ",CONCAT({plannedCompletionDate}," - ",{name}))

 




Avatar

Correct answer by
Community Advisor

I just looked at your task list you posted and see that it would filter out additional items in the milestones below so I would do 2 IF statements combined.

 

Try this:

 

IF(CONTAINS('Asset:',{name})," ",IF(CONTAINS('Fusion - Asset Inventory',{name}),"",CONCAT({plannedCompletionDate}," - ",{name})))




Avatar

Level 2

YES!! That worked! I knew it would have to be a double statement, but I'm still uncertain how to write those being so new to text mode. Any pointers on where to find a cheat sheet?

 

Thank you so much, Kellie, for sticking with me and for your help. So appreciate the extra brains coming together here!

Avatar

Community Advisor

I knew we'd get there eventually. Just took a little processing.

 

I learned double IF statements in Excel and just kind of used that knowledge to transfer into Workfront text mode reporting.

 

Basically you'd write your if statement as normal except when you go to put in a "false" response you start the new IF statement. When doing mine I like to do new lines so I can see what I'm doing and get the right amount of parenthesis which is the hardest part for me.

 

IF(Something is True, then do something, otherwise do something else)

 

IF(true statement, then do this,

IF(2nd true statement, 2nd do this,

IF(3rd true statement, 3rd do this,

otherwise do this for everything else)))

 

It gets a little more tricky when you start inserting other variables into the if statements. 

 

I'm sure there is somewhere online that would have training videos on how to do value expressions but I haven't looked into.

 




Avatar

Level 2

Fabulous advice, Kellie. And I'm sure practice will make...semi-perfect  

Thanks again! I'll try to find some resources and also take your cues to start new lines with each statement. 

Avatar

Community Advisor

 

Hi @ColleenKl,

 

Further to the excellent advice from @KellieGardner, I'd also suggest you consider using software such as Sublime or Visual Studio Code that have tools to help you format and keep track of the bracketing on complex if statements.

 

Regards,

Doug  

Avatar

Level 7

Hi Colleen, 

 

You said that the Project tasks are milestones. Are you using a milestone path on the project and do you have them tagged?  If so, you can use this textmode on a Project report to pull only those Project tasks:

 

valueexpression=IF(!ISBLANK({milestoneID}),CONCAT({plannedCompletionDate}," - ",{name}))
listdelimiter=<p>
listmethod=nested(tasks).lists
valueformat=HTML
displayname=Project Tasks + Due Date
textmode=true
type=iterate

 

This is my test schedule:

TealeMcCleaf_1-1709687956650.png

 

My test renders the following results:

TealeMcCleaf_0-1709687852177.png

 

I hope this helps, 

Teale

Avatar

Level 2

Hey Teale - interesting to see another perspective! We aren't using WF milestones currently. Internally, we reference project tasks as "milestones" to differentiate them from asset tasks. But cool to understand something different!