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.
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
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
Views
Replies
Total Likes
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.)
Views
Replies
Total Likes
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}))
Views
Replies
Total Likes
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
Views
Replies
Total Likes
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!
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.)