Expand my Community achievements bar.

Latest Community Ideas Review is Out: Discover What’s New and What to Expect!
SOLVED

Text Code for Assignement Breakdown?

Avatar

Level 10

Hi,

Since expert in text code; so looking for a favour. We use assignment breakdown as column in project view, the code is;

displayname=Assignment Breakdown

listdelimiter=<br>

listmethod=nested(assignments).lists

textmode=true

type=iterate

valueexpression=CONCAT({assignedTo}.{name}," (",{role}.{name},") - ",{workRequired}/60,IF({workRequired}/60>ABS(1)," Hours"," Hour"))

valueformat=HTML

Id planned hours is 40 hrs equally between 3 assigments, then the planned hour shows 13.3333333 hrs each.

Any solution to round this number?????

Thanks in advance.

Mvh

Kundan

Topics

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

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi Kundan,

Adding ROUND function to your value expression would enable you to do this. See updated code below where we are rounding to 2 decimal places. If you wanted to round to a different number of decimal places, simply change the 2 highlighted in bold to how many decimal places you need.

displayname=Assignment Breakdown

listdelimiter=<br>

listmethod=nested(assignments).lists

textmode=true

type=iterate

valueexpression=CONCAT({assignedTo}.{name}," (",{role}.{name},") - ",ROUND({workRequired}/60,2),IF({workRequired}/60>ABS(1)," Hours"," Hour"))

valueformat=HTML

Best Regards,

Rich.

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

Hi Kundan,

Adding ROUND function to your value expression would enable you to do this. See updated code below where we are rounding to 2 decimal places. If you wanted to round to a different number of decimal places, simply change the 2 highlighted in bold to how many decimal places you need.

displayname=Assignment Breakdown

listdelimiter=<br>

listmethod=nested(assignments).lists

textmode=true

type=iterate

valueexpression=CONCAT({assignedTo}.{name}," (",{role}.{name},") - ",ROUND({workRequired}/60,2),IF({workRequired}/60>ABS(1)," Hours"," Hour"))

valueformat=HTML

Best Regards,

Rich.

Avatar

Level 10

Thanks a lot @Richard Leek‚ . It works great.

Mvh

Kundan.