Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

CRRPE3022E The JavaScript expression could not be evaluated. TypeError: Cannot read property "value" from undefined (src1#19)

 Hi team,


Currently I am using RPE to generate report for DNG module,
I am using the below java script:

if(arrayObject == '')
{
arrayObject = [];
}
var i = 0;
for( i = 0; i1 < arrayTitle.length; i++)
{
var tempObj = { title:'', value:''};
if( arrayTitle[i1] != prevTitle)
{
tempObj["title"] = arrayTitle[i1];
tempObj["value"] = arrayValue[i1];
arrayObject.push(tempObj);
}
else
{
arrayObject[i1-1].value = arrayObject[i1-1].value +', '+ arrayValue[i1];
}
prevTitle = arrayTitle[i1];
}

when I run the report template, it show error as below:
CRRPE3022E The JavaScript expression could not be evaluated.
TypeError: Cannot read property "value" from undefined (src1#19)
[Error context] Template is D:\Anh_Do\ALM\RPE\RPE_Module_detail_report_1.dta
[Error context] Template element is 90
[Error context] Expression is used for CODEBLOCK

I think I have declared array with every item is with type: var tempObj = { title:'', value:''}; so the property "value" for every item in array should be accessible. But the RPE tool keep give error like that.

Please help me on this,
Thank you,
Best regards,
Anh Do

0 votes



One answer

Permanent link

I believe it complains about this line.

arrayObject[i1-1].value = arrayObject[i1-1].value +', '+ arrayValue[i1];
Basically your code references an undefined arrayObject[i1-1].

Not sure whether the forum messed up your code - I cannot see where you set the value for i1 and when to change it. The code makes no sense to me.

0 votes

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 12,029

Question asked: Feb 22 '17, 4:41 a.m.

Question was seen: 2,127 times

Last updated: Mar 10 '17, 12:21 a.m.

Confirmation Cancel Confirm