Expand my Community achievements bar.

How to conditional format fields created with custom text?

Avatar

Level 2
I have the below field that will display a project end date if there is one, and if there isn't one it displays the Request End date. I would like to make the background of this field red if it is past the current day to signify it needs to be updated. I tried adding the code below but it was not successful. Also, if there are any good tips or articles on syntax for custom coding, I would love to read them! Current Code: displayname=End Date linkedname=direct namekey=plannedCompletionDate querysort=plannedCompletionDate textmode=true valueexpression=IF(ISBLANK({resolveProjectID}),{plannedCompletionDate},{resolveProject}.{plannedCompletionDate}) valueformat=atDate Tried: displayname=End Date linkedname=direct namekey=plannedCompletionDate querysort=plannedCompletionDate styledef.case.0.comparison.icon=false styledef.case.0.comparison.leftmethod=DE:plannedCompletionDate styledef.case.0.comparison.lefttext=DE:plannedCompletionDate styledef.case.0.comparison.operator=lt styledef.case.0.comparison.operatortype=date styledef.case.0.comparison.righttext=$$TODAY styledef.case.0.comparison.trueproperty.0.name=bgcolor styledef.case.0.comparison.trueproperty.0.value=eac6c9 styledef.case.0.comparison.truetext= textmode=true valueexpression=IF(ISBLANK({resolveProjectID}),{plannedCompletionDate},{resolveProject}.{plannedCompletionDate}) valueformat=atDate Donald Lay Charles Schwab
Topics

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

4 Replies

Avatar

Level 10
Hi Donald, a couple of observations I have are: · In the column, you are checking to see if the issue has a resolving project. If not, you show the issue planned completion date. If yes, you are showing the resolving planned completion date. · You want the color to be red if either date is less than today. I don't think you can handle this in one column because you can't use calculated expressions to drive formatting in the view. However, you can use a calculated field on the issue to determine the "Calculated Planned Completion Date" using the function you already have as follows: Once you have this calculation in the issue custom form as a "Calculated Date" field, you can pull it into the view and apply your coloring using the interface instead of digging into the code. Hope this helps!

Avatar

Level 2
If I could get this calc to work it would help me on so many other things that I am trying to do similar to this! Bad part is I am not able to get it to pull the resolve Project information. I can get the formula to work if I keep everything to the request information but as soon as I add Resolve Project.Planned Completion Date the field goes blank. Any idea if i'm doing something wrong here or is there a limitation preventing me from pulling in a project field? Donald Lay Charles Schwab

Avatar

Level 2
Actually I think it may be working.. but the calculation isn't just happening on existing items that are open. Do you need to edit every project/request to make the calc work? It is only working on new items. Donald Lay Charles Schwab

Avatar

Level 2
I think I actually have this working now. I just edited all the requests and opened the form on them and didn't make a change and the field now populates. Is it possible to do this with the Request title/link and the project title/link? If there is a project the name and link would take you to the project but if there is no project the name and link would take you to the request. Donald Lay Charles Schwab