Text Code for Assignement Breakdown? | Community
Skip to main content
Kundanism
Level 10
February 21, 2022
Solved

Text Code for Assignement Breakdown?

  • February 21, 2022
  • 1 reply
  • 1001 views

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Richard_Le_

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.

1 reply

Richard_Le_Community AdvisorAccepted solution
Community Advisor
February 22, 2022

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.

Kundanism
KundanismAuthor
Level 10
February 22, 2022

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

Mvh

Kundan.