FireGeek21
Technical User
I need to find out if an array parent.EligPlans[2] has a specific plan in it. If so, then I need to assign it to a variable for later use after a "for" loop. There are some elements in this array I don't want to deal with (apply a custom message in this case) but there are 7 specific elements I do need to apply a custom message for.
Tried the following code to create an array of elements I am looking for and then check if parent.EligPlans[2] has an element I want. The long and short of it is that I am getting this message, "Object doesn't support this property or method."
Thoughts on what I am doing wrong or what I should do?
Thanks!!!
JavaScript:
var customMsgPlan = new Array("a", "b", "c", "d", "e", "f", "g", "h");
for (var i=1; i<parent.EligPlans.length; i++)
{
for (var c=1; c<customMsgPlan.length; c++)
{
if (customMsgPlan.indexof(parent.EligPlans[i][2]) >= 0)
{
customMsg = parent.EligPlans[i][2]
}
}
// Other code
}
FireGeek
(currently using Crystal Reports XI with Lawson 9.01)