내 커뮤니티 업적 표시줄을 확대합니다.

Don’t miss the Workfront AMA: System Smarts & Strategic Starts! Ask your questions about keeping Workfront running smoothly, planning enhancements, reporting, or adoption, and get practical insights from Adobe experts.
해결됨

Need help adding conditional formatting to a custom column with a custom calculated valueexpression

Avatar

Level 1

So essentially I created a valueexpression that calculates the difference between the entry date and the actual completion date and returns a "## days" copy. I'm hoping to add custom formatting (cell color and text color) for any returns greater than both 30 and 90 days. I can't figure out how to align the comparison left and right text to return that outcome. Here is the code I have so far:

 

displayname=Entry-Actual Completion Date
linkedname=direct
querysort=plannedCompletionDate
styledef.case.1.comparison.icon=false
styledef.case.1.comparison.leftmethod=direct
styledef.case.1.comparison.lefttext=direct
styledef.case.1.comparison.operator=gt
styledef.case.1.comparison.operatortype=date
styledef.case.1.comparison.righttext=90 Days
styledef.case.1.comparison.trueproperty.0.name=textcolor
styledef.case.1.comparison.trueproperty.0.value=d30519
styledef.case.1.comparison.trueproperty.1.name=bgcolor
styledef.case.1.comparison.trueproperty.1.value=eac6c9
styledef.case.1.comparison.trueproperty.2.name=align
styledef.case.1.comparison.trueproperty.2.value=left
styledef.case.1.comparison.truetext=
styledef.case.2.comparison.icon=false
styledef.case.2.comparison.leftmethod=direct
styledef.case.2.comparison.lefttext=direct
styledef.case.2.comparison.operator=gt
styledef.case.2.comparison.operatortype=date
styledef.case.2.comparison.righttext=30 Days
styledef.case.2.comparison.trueproperty.0.name=textcolor
styledef.case.2.comparison.trueproperty.0.value=e19503
styledef.case.2.comparison.trueproperty.1.name=bgcolor
styledef.case.2.comparison.trueproperty.1.value=feecc8
styledef.case.2.comparison.truetext=
textmode=true
valueexpression=CONCAT(ROUND(DIV(DATEDIFF({actualCompletionDate},{entryDate}),2),0)," Days")
valueformat=HTML

주제

토픽은 커뮤니티 콘텐츠를 분류하여 관련성 있는 콘텐츠를 찾는 데 도움이 됩니다.

1 채택된 해결책 개

Avatar

정확한 답변 작성자:
Community Advisor

ah ok. That explains it. I'm sure this isn't right but my brain always translates the "leftmethod" and "lefttext" stuff as "here's the field we're using on the left" and so I was a bit surprised to see that "direct" might work (I guess it doesn't, lol). And so that's why I'm also recommending a calculated field -- probably the best way to get something that works in that space so you can do some formatting to see if you want to commit to that kind of thing.

원본 게시물의 솔루션 보기

3 답변 개

Avatar

Community Advisor

I'd be interested to hear how you came up with this, especially the leftmethod and lefttext lines. Can I instead talk you into putting a calculated field on all your objects and doing your calculation in there, and formatting it as a number? (leave off the days text for the time being... maybe if you can get the field comparison to work, you can put in a valueexpression to add " days")

Avatar

Level 1

Hi Skye,

 

I apologize, that was an earlier attempt to try and work out the issue, I pulled the "direct" from the linkedname field. I'll look into the calculation option and see if I can find a workaround, otherwise it's not the end of the world if that data can't have rules and formatting. Thanks!

Avatar

정확한 답변 작성자:
Community Advisor

ah ok. That explains it. I'm sure this isn't right but my brain always translates the "leftmethod" and "lefttext" stuff as "here's the field we're using on the left" and so I was a bit surprised to see that "direct" might work (I guess it doesn't, lol). And so that's why I'm also recommending a calculated field -- probably the best way to get something that works in that space so you can do some formatting to see if you want to commit to that kind of thing.