Cannot read property "0" from undefined

basantsoni
Kilo Guru

Hello Friends,

I’m facing error messages when we are reading and printing all array values from for loop.

I have stored true/false fields into array.

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Basant,

this happens when you are trying to access something which has not that property

try below and check whether error comes or not

gs.info('Following Array Values : ' + gciscdP[checkboxes[i]]);

Mark Correct if this solves your issue and also mark Helpful if you find my response worthy based on the impact.
Thanks
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

10 REPLIES 10

Community Alums
Not applicable

For the email actions, I have a requirement to pick the values from Additional information of the Alert , it works fine while testing but when running the End to end testing it throws and error saying cannot read property Null, but this is not shown while testing it, could there be any specific reason for this?