It's all about the answers!

Ask a question

Calculated Field Javascript Help

Paul Wellman (71119) | asked Mar 16 '12, 11:29 a.m.

I am currently trying to create a calculated field that displays a number value/calculation of two other fields entered into a workitem.

To start I am simply trying to access the value of one of the fields using the following code:

(function() {
dojo.declare("com.example.ValueProvider", null, {

getValue: function(attribute, workItem, configuration) {
var test_stringAttribute = workItem.getValue("");
var hours = Number(test_stringAttribute);
return hours;


The Custom Field is "" and I am trying to display this in a read only field on the work item.

I have created a Calculate Value entry in the Attribute Customization area of my Project Area using the above code in a Javascript File. The necessary permissions have been enabled along with the necessary dependencies.

Could anyone provide me with some guidance or the location of a basic step by step tutorial. All of the examples on the jazz wiki assume I have extensive knowledge of deploying the actual scripts.

Thank you so much for any help you may have.



2 answers

permanent link
Ralph Schoon (63.2k33646) | answered Mar 23 '12, 4:51 a.m.
Hi Paul,

in RTC 3.0.1.x you go to the process items>work item customization. There you create your calculated value provider and upload your script. It is automatically attached to the process (Links>attachments). You then add the calculated value provider to your attribute and check the dependent attributes so that you get triggered on changes.

There is also an article in the library that walks you trough this, I think.

Juan Pablo Bruno commented Aug 09 '12, 4:29 p.m.

How can you see the "work item customization" option from the web ui?

permanent link
Juan Pablo Bruno (26710) | answered Aug 09 '12, 4:28 p.m.
How can you see the "work item customization" option from the web ui?

Vince Thyng commented May 07 '14, 1:09 p.m.

The work item customization is not in the web ui, only eclipse.  At least not the attribute customization settings that you are implementing.

Your answer

Register or to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.