Post

3 followers Follow
0
Avatar

Duration to float (Reporting)

Use Case

I need to report on Duration in a particular way, and unfortunately at the moment, not all functions are available when creating Formula Field Columsn in reports.

In the Timesheet module, I need to convert the Duration field to a float to represent hours.

Thats fine, but how can you test if a Duration field has been set to Hours, Days etc for that record?

Gareth Bradley Answered

Please sign in to leave a comment.

4 comments

0
Avatar

Hi Gareth,

 

You are right, some of the functions that are used to convert duration fields to numeric fields are not available in the context of reports and dashboard. However, you can create a custom field in the configuration module. For example $Duration/Hours(1) to convert duration field into numeric hours.

 

Good luck!

Tamir

Tamir Avital 0 votes
Comment actions Permalink
0
Avatar

How can you test if the VALUE of $Duration is set to an Hour, Day or Week?

 

for example "20 h".

Gareth Bradley 0 votes
Comment actions Permalink
0
Avatar

Hi Gareth,

 

Yes, you can use ToString function for example: Contains(ToString($Duration),'h')

 

Please let me know if it makes sense.

 

Regards,

Tamir

Tamir Avital 0 votes
Comment actions Permalink