Expand my Community achievements bar.

SOLVED

Document Grouping: By docObjCode >> referenceObjectName

Avatar

Community Advisor

The below text mode is meant for viewing a large set of documents in a project and grouping them:

A) by what level of the project were they attached (the project itself, or a task, or an issue?) and then

B) by the actual object to which the document was attached.

group.0.displayname=Attached To

group.0.valuefield=docObjCode

group.0.valueformat=HTML

group.1.displayname=On

group.1.valuefield=referenceObjectName

group.1.valueformat=HTML

textmode=true

This works, but the drawback is that docObjCode displays PROJ, or TASK, or OPTASK. I want to substitute those values with Project, Task, or Request.

I cannot seem to get any valueexpression at all to work with docObjCode or referenceObjCode. Happy to hear any suggestions for this, or know if it isn't possible to use those attributes in a valueexpression.

If you like my content, please take a moment to view and vote on my Idea Requests: https://tinyurl.com/4rbpr7hf
Topics

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

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Thanks Anthony. That didn't quite work as expected (OPTASK did show as REQUEST, but PROJ still displayed as PROJ). But it did confirm that valueexpressions do work on that attribute and I was able to make the below work. Thank you!

group.0.displayname=Attached To

group.0.valueexpression=IF({docObjCode}="OPTASK","Requests",IF({docObjCode}="TASK","Tasks",IF({docObjCode}="PROJ","Project",{docObjCode})))

group.0.valueformat=HTML

group.1.displayname=On

group.1.valuefield=referenceObjectName

group.1.valueformat=HTML

textmode=true

If you like my content, please take a moment to view and vote on my Idea Requests: https://tinyurl.com/4rbpr7hf

View solution in original post

5 Replies

Avatar

Level 10

Hi - try this... replace what you have in bold with group.0.valueexpression=IF({docObjCode}="OPTASK","REQUEST",IF(ISBLANK({docObjCode}),"PROJECT",{docObjCode}))

That should work. I put them in all caps so you didn't have to do an IF statement for TASK, but if you want them in regular case, you will jsut need to add the statement. (I can help.)

Avatar

Level 10

I lied! Coded the wrong line (I used this from a noteObjCode report I have. LOL!)

It should be group.0.valueexpression=IF({docObjCode}="OPTASK","REQUEST",IF({docObjCode}="PROJ","PROJECT",{docObjCode}))

Avatar

Correct answer by
Community Advisor

Thanks Anthony. That didn't quite work as expected (OPTASK did show as REQUEST, but PROJ still displayed as PROJ). But it did confirm that valueexpressions do work on that attribute and I was able to make the below work. Thank you!

group.0.displayname=Attached To

group.0.valueexpression=IF({docObjCode}="OPTASK","Requests",IF({docObjCode}="TASK","Tasks",IF({docObjCode}="PROJ","Project",{docObjCode})))

group.0.valueformat=HTML

group.1.displayname=On

group.1.valuefield=referenceObjectName

group.1.valueformat=HTML

textmode=true

If you like my content, please take a moment to view and vote on my Idea Requests: https://tinyurl.com/4rbpr7hf

Avatar

Level 10

Glad you got it to work! I was trying to be all cool and like "Oh, I'll just update my noteObjCode text mode from this report" totally forgetting that in noteObjCode, there is no code for Project. If it is blank, then it is a Project Note. HAHAHAHA!

Avatar

Community Advisor

You can also sometimes reformat ___ObjCode fields. In this specific case, it looks like the below.

group.0.displayname=Attached To

group.0.valuefield=docObjCode

group.0.valueformat=objCodeMessage

Other common examples it works for: report's uiObjCode and, well... note's noteObjCode -- barring the project object which is still a NoValue.

(I learned this a while ago but couldn't remember the coding to use, so I just asked the helpdesk for help, and they came through for me. Hopefully posting this will save me some time in having to remember the next time.)