Why a Calculated Field is blank ?

Document ID : KB000045096
Last Modified Date : 14/02/2018
Show Technical Document Details

Problem:

Calculated Field shows blank value if any of the fields in the expression is Null.  All the predefined functions {"sum, max, min, average etc.."} handles the null values of the attributes properly. If there are any custom calculated expressions, then there is no proper mechanism to handle attribute's null values and is resulting in this issue.

 

Steps to Reproduce:

1.     Go to Project Object:
Created 4 custom attributes:
my_num1, my_num2, my_num3, my_num4 (all of Number type)

2.     Created a Calculated attribute my_calculated with expression:
(((my_num1*my_num2) + my_num3)*.40) + (my_num4*.20)

Put all above attributes in the Edit View.

3.    Open a Project. Enter values in fields my_num1, my_num2, my_num4.
Do no enter anything in field my_num3.
Click on Save

4.    Observe Calculated attribute my_calculated

Expected Result:  

Calculated field should show result as per the calculation.

Actual Result:  

Calculated field is coming as blank.

Cause:

Caused by CLRT-79729

Resolution:

Open.