Hi Workfront Community,
I'm trying to format the actual hours column for projects so that it's green if the value is less than the value in the planned hours column and red if the actual hours value is greater. I was successful with this for the planned start date and actual start date columns, and tried to replicate the text mode for these new custom rules. However, I'm not having much luck because all values in the actual hours column now appear red. I thought it would be wise to have an extra set of eyes look at the text mode because I'm scratching my head on this one.
Thanks,
Jared
Topics help categorize Community content and increase your ability to discover relevant content.
Hi Jared,
I invite you to examine the attached example and compare it to your custom formatting rules.
As a best practice (and to keep things simple), I'd also suggest writing the "hard" formatting first, in order (e.g. start with the Turn It Red case), and then end with an easy default case (e.g. otherwise, show Green if the ID on the row is not null...which will always be the case, if the processing gets to this final condition).
Regards,
Doug
Views
Replies
Total Likes
Doug,
Thanks for reminding me about the the rightmethod and righttext lines. I made those the same, but I'm not out of the woods yet. "plannedHours" in those lines still made everything red, and "workRequired" made everything green, so I'm still missing something.
Views
Replies
Total Likes
Hi Jared,
Depending on what you're comparing, I suggest you check to see if one of them is in minutes (e.g. 90), and the other is in hours (e.g. 1) or worse, be non-numeric (e.g. 1.5hrs).
Now, "asking" via a report can be misleading, since Workfront sometimes auto-converts for you, so try adding a fresh column for each to the report, perhaps even switching the valuefield=someField to valueexpression=SUM(someField,0) to confirm that it's numeric, and whether it's minutes or hours.
The other Geeky approach is to use the API, using [mydomain].my.workfront.com/attask/api/v10.0/task/search?ID=[myTaskID]&fields=* which will (once you make the proper substitutions) return everything you wanted to know about that task but were afraid to ask, from among which you can then identify two candidates of the same temporal magnitude (hours vs minutes) for your FIELDS custom formatting.
Regards,
Doug
Views
Replies
Total Likes
Hi Jared! I'm trying to do this exact same thing in Text Mode, and am having your exact same outcome. Did you find the solution? I can make everything red - or nothing. Lol
Views
Replies
Total Likes
Hi Autumn (and Jared),
I invite you to review my How to highlight Actual Hours in Red post from a couple of weeks ago.
Regards,
Doug
Thanks Doug! I'll check that out and give it a try.
Views
Replies
Total Likes
Ok. I couldn't get the code provided in Doug's post to work in my project report. Then I saw where he said apply it to a task view. So I recreated a task report, grouped by projects and only included our Projects Total parent task we use on every project. The result is a bit of a work-around, but it does in the end tell us which projects have more actual hours spent than planned hours. So that's a win. Thank you both!!
Views
Replies
Total Likes
Views
Likes
Replies