Expand my Community achievements bar.

custom column to bring 2 task names due date in

Avatar

Level 3

Hi folks. I am trying to figure out if i can add an OR bit to this section so i can bring in "Internal | Proofreading" and "Final Files | Proofreading" into the same column. 


displayname=Proofreading Task Due Date
listdelimiter=<p>
listmethod=nested(project.tasks).lists
shortview=true
type=iterate
valueexpression=IF(CONTAINS("Internal | Proofreading",{name}),{plannedCompletionDate},"")
valueformat=HTML

Not sure if theres something with the OR:1: bit that goes before a bunch of text and i go that way, OR if theres an edit to the Valueexpression syntax sort of If Contains OR If contains. 
Any help greatly appreciated! thanks! 
@skyehansen @Lyndsy-Denk  @NicholeVargas  thanks!! 

7 Replies

Avatar

Community Advisor

no, don't go that way (with the OR:1) -- that never works.

 

Calculated fields and valueexpressions have a lot in common, so I would use this link here:

https://experienceleague.adobe.com/en/docs/workfront/using/reporting/reports/calculated-custom-data/...

 

I haven't tried but I feel like they are so similar to each other, that you can even test it using a calculated field (e.g. in the preview sandbox), which is great because the calculated field builder gives you a LOT of feedback. Once you get something that works in a calculated field, I bet you can then just copy/paste it back into your valueexpression.

 

Looking at the link, you could look into using an IFIN function, or nest two IF statements, one inside the other. I've also seen people using double pipe symbols, which isn't really covered anywhere but seems to work. Like this one by Kurt Jones.

https://experienceleaguecommunities.adobe.com/t5/workfront-questions/calculated-field-from-multiple-...

 

 

Avatar

Level 3

Thanks Skye! this is great info! i appreciate you sharing the link for the different syntax terms, i must bookmark that for reference! 

Avatar

Employee Advisor

You don't need an OR statement, you can just continue your IF statement to include the second task. 

displayname=Proofreading Task Due Date
listdelimiter=<p>
listmethod=nested(tasks).lists
shortview=true
type=iterate
valueexpression=IF(CONTAINS("Internal | Proofreading",{name}),{plannedCompletionDate},IF(CONTAINS("Final Files | Proofreading",{name}),{plannedCompletionDate},""))
valueformat=HTML

Keep in mind that if you have both of these tasks in the project, they will both show in your column. 

Avatar

Level 3

Thanks Nichole!! I think this "feels" like it makes a bit more sense to me. 
However i have a slight issue with another task just after called "Internal | Proofreading Revisions" 
that is now pulling in! so instead of 2 dates - which is manageable as they are distinctly different. I now have 4 dates, 2 of which are the day after each other. 

Is there any way to make it so it specifically JUST includes the text, and no extra words - "revisions" 
OR should i aim to change that other task name to a different format that avoids the same word format. (moving Revisions, before Proofreading, for example) 
Thanks!! 

Avatar

Level 4

This should do it:

displayname=Proofreading Task Due Date
listdelimiter=<p>
listmethod=nested(tasks).lists
shortview=true
type=iterate
valueexpression=IF(CONTAINS("Internal | Proofreading Revisions",{name}),"",IF(CONTAINS("Internal | Proofreading",{name}),{plannedCompletionDate},IF(CONTAINS("Final Files | Proofreading",{name}),{plannedCompletionDate},"")))
valueformat=HTML

Avatar

Employee Advisor

If you are using template tasks, I'd recommend using that field (templateTaskID) in your valueexpression, however, if you wanted to pull in planned completion dates simply based on the name of the task (must be exact language), then you could use something like the following instead of CONTAINS: 

displayname=Proofreading Task Due Date
listdelimiter=<p>
listmethod=nested(tasks).lists
shortview=true
type=iterate
valueexpression=IF({name}="Internal | Proofreading",{plannedCompletionDate},IF({name}="Final Files | Proofreading",{plannedCompletionDate}))
valueformat=HTML

Keep in mind if multiple dates are shown in the column, you may want to consider updating the expression include both the task name and planned completion date to make it clear. Would would be something like this:

displayname=Proofreading Task Due Date
listdelimiter=<p>
listmethod=nested(tasks).lists
shortview=true
type=iterate
valueexpression=IF({name}="Internal | Proofreading",CONCAT({name}," - ",{plannedCompletionDate}),IF({name}="Final Files | Proofreading",CONCAT({name}," - ",{plannedCompletionDate})))
valueformat=HTML

 

Avatar

Level 3

Thank you kindly for this! so removing the CONTAINS allows it to be task specific.

then the CONCAT part is bringing in the task name before the date to provide a bit more light to what the date is (if we have multiple options for task names/dates being brought in. 

 

You mentioned use of the templateTaskID - where would i find that ID? is it this bit in task details 

MattEl5_0-1765226187116.png


If a template task was duplicated in a project, would it have the same templateTaskID ? or would a new one be generated? 
Wondering if i go that path, when somethings doubled up, if it breaks the report. thanks!