Array push not working in while loop

this is not working - the first sys id is added twice

var arrSYSIDS = []; while (gr.next()) { arrSYSIDS.push(gr.sys_id); gs.print(gr.sys_id); }




SOLUTION: try this instead:

var arrSYSIDS = []; while (gr.next()) { arrSYSIDS.push(gr.sys_id.toString()); gs.print(gr.sys_id); }

Comments

Popular posts from this blog

GlideRecord setValue

variable advanced reference qualifier example

Running transform maps asynchronously