Expand my Community achievements bar.

Filter a Proof Approval Report by Two Portfolios Using Text Mode

Avatar

Level 2

I am looking to filter a proof approval report by two different portfolios using text mode. The filter criteria should be:

  • GTE $$TODAY - 5
  • In a project in Portfolio ABC and Portfolio XYZ

Does anyone have the text mode prompts to achieve this? Thanks!

6 Replies

Avatar

Community Advisor

You mean the document is in either ABC or XYZ? 

 

use the power of OR:1 - dummy (non-tested) code as example. First get the first block working then copy/paste and adjust the second block

approvalDate_Mod=gte
approvalDate=$$TODAY-5
document:portfolioID=ABC

OR:1:approvalDate_Mod=gte
OR:1:approvalDate=$$TODAY-5
OR:1:document:portfolioID=ABC

 

Avatar

Level 2

Yes. The document can be in a project that is in the portfolio. That part is important because the document is not in the portfolio but rather in the project that is in the portfolio. Make sense?

 

Portfolio > Project > Document

Avatar

Community Advisor

right - then you have to filter on document:project:portfolio

 

and still do the OR:1 block

Avatar

Community Advisor

likely too many hops. You can't go from proof approval to document -- the path would be proof approval, document version, document, project, portfolio. I would probably recommend an exists filter at this point.

Avatar

Community Advisor

Ah duh. 
Thanks for the reminder : (  It's true, from a docuVersion you can't get past the document object. 

 

I remember we had a similar issue and ended up using a calculated field on the document. 

 

In this case you could create a field with the expression {project}.{portfolioID} and use that in the filter expression on the approval. 

Avatar

Community Advisor

You could try this one -- you would have to test the results thoroughly.

 

EXISTS:a:$$OBJCODE=DOCU
EXISTS:a:currentVersionID=FIELD:documentVersionID
EXISTS:a:project:portfolioID=XYZ ABC

approvalDate_Mod=gte
approvalDate=$$TODAY-5

(XYZ and ABC are separated by a tab space above)