Expand my Community achievements bar.

SOLVED

Display "Logged Hours" in a WF custom form using the Calculated Field

Avatar

Level 1
Hi WF users,
 
I'm modifying an existing Form to show the total number of hours logged against a project.
I am aware that this data is already available via the Hours Tab, or can be obtained through a report. However, for convenience sake I want to be able to see it in a Custom Form.
 
I found the Field "Hours Logged" which I've added to the formula:
 
{DE:Hours Logged}
 
However, nothing is displayed in the field when I go into the form.
 
Does anyone know what I need to change in my formula? Or is there an easier way of doing it?
 
Thanks in advance.
1 Accepted Solution

Avatar

Correct answer by
Level 10

Hello Thomas,

 

the field you are trying to reference to in your formula is a custom field.
Custom fields are referenced using the DE: prefix.

 

To get system fields into calculated fields, I would have suggested to have a look into the API Explorer under Project.

There you will find two fields, which could help:

  • actualWorkRequired - labeled as Actual Hours and also findable under the fields search in the editor
  • actualWorkRequiredDouble

 

Unfortunately the calculated fields editor is crap. You will get an error message trying to use

{actualWorkRequiredDouble}

although it shows the correct double value if you select a corresponding project under Preview on an existing object before.

 

So, to be able to save your form, you will need to work with the field actualWorkRequired. This will provide your hours in minutes, so to get a decimal, you will need to calculate like this

{actualWorkRequired}/60

 

 

I hope this helps.

 

Regards

Lars

 

View solution in original post

3 Replies

Avatar

Correct answer by
Level 10

Hello Thomas,

 

the field you are trying to reference to in your formula is a custom field.
Custom fields are referenced using the DE: prefix.

 

To get system fields into calculated fields, I would have suggested to have a look into the API Explorer under Project.

There you will find two fields, which could help:

  • actualWorkRequired - labeled as Actual Hours and also findable under the fields search in the editor
  • actualWorkRequiredDouble

 

Unfortunately the calculated fields editor is crap. You will get an error message trying to use

{actualWorkRequiredDouble}

although it shows the correct double value if you select a corresponding project under Preview on an existing object before.

 

So, to be able to save your form, you will need to work with the field actualWorkRequired. This will provide your hours in minutes, so to get a decimal, you will need to calculate like this

{actualWorkRequired}/60

 

 

I hope this helps.

 

Regards

Lars

 

Avatar

Level 1

Hi Lars,

 

Thanks very much for the explanation.

 

I have tried your suggestion:

{actualWorkRequired}/60

 

I have also tried a number of other System fields from the list, but in each case the field is showing as blank in the project business case form.

 

I'm starting to think that I need more detail in the calculation field. I've attached some settings and results for reference, using:

 

{actualWorkRequired}

 

Thanks

-Tom

Avatar

Level 1

Hi Lars,

 

Please ignore, it's working now. For some reason the formula doesn't update unless you log out and then log back in.

 

Thanks again.

 

-Tom