Display "Logged Hours" in a WF custom form using the Calculated Field | Community
Skip to main content
May 17, 2024
Solved

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

  • May 17, 2024
  • 1 reply
  • 833 views
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.
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 lgaertner

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

 

1 reply

lgaertner
lgaertnerAccepted solution
Level 9
May 17, 2024

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

 

May 19, 2024

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

May 20, 2024

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