Expand my Community achievements bar.

Document Link on Project Report

Avatar

Level 2

I'm trying to create a column that will display the link to a brief document on a project.  I tried the below text...and think I hallucinated it working yesterday...but it is not displaying as I expected.  Any ideas?

 

displayname=Link to Brief
listdelimiter=<p>
listmethod=nested(project).nested(documents).lists
textmode=true
type=iterate
valueexpression=IF(CONTAINS('brief',{name}),CONCAT("http://domain.my.workfront.com/","document/",{ID}, "/details"))
valueformat=HTML

Topics

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

8 Replies

Avatar

Community Advisor

how were you expecting it to display? And what is it doing instead?

Avatar

Community Advisor

couple things:

1. in your code there is a mistake with duplicated part in line 3 which I think should read:

listmethod=nested(documents).lists

 2. I thought it's IF that is causing issues because you are using it almost as filter, but I confirmed it's not IF by removing it

3. Following code works just fine on project page, task view:

displayname=List
listdelimiter=<p>
listmethod=nested(documents).lists
type=iterate
valueexpression={ID}
valueformat=HTML

4. exactly the same code doesn't work on portfolio page, project view.

5. However, slightly modified code works just fine:

displayname=List
listdelimiter=<p>
listmethod=nested(tasks).lists
type=iterate
valueexpression={ID}
valueformat=HTML

Therefore I think it's either by design that documents collection won't work on portfolio level OR it's a bug. To verify that I would reach out to support

Avatar

Community Advisor

Rafal, your initial code (3) works on a portfolio page right now. Maybe it was a brief outage?

Avatar

Level 6

@skyehansen it works if you have documents at the program. 

Any project documents (as OP described) will not get listed.

 

The OP is on a page that lists projects (eg projects view in program detail) and wants to iterate over each of the listed projects' documents. I'm not aware of a method to do a double-iterate

Avatar

Community Advisor

Maybe something wrong with your cluster? Rafal's code is working fine on all fronts. In a portfolio, looking at projects. In a program, looking at projects. On a project report. All 3 list projects and then doc IDs in the projects all show up.

 

Let me know if there is anything else you would like me to try? I think we are on cluster 3 if that helps.

 

Edited to add that I got the original valueexpression to display content as well. The only thing I noticed is that using a p-tag was not great. Just displays as one long URL with "<p>" interspersed. The br tag worked better, but potentially if there's only one brief in each project, this might not matter.

Avatar

Level 6

Thanks for following up! 

Sorry - Rafal's code is 100% fine. And I just retried - now I do see docs attached to a project in Program/projects view... Same code. So I must have fatfingered something.

 

BTW the interspersed <p>s - I think that's a bug in the iterator: the link/href around the <p> is a combination of multiple docs... 

 

I found if I use comma, <br/> or <br/><br/> the links are clean

 

 

 

 

Avatar

Level 1

I'd love to expand on this question. I'm wanting to have a column in a completed projects reports that has a link to our "Final Files" folder in the Documents section. Is that possible?

Avatar

Level 2

You're saying the original expression worked for you?  I'm still struggling to get this resolve.