ArrayUtil diff not returning results

Renee-17
Tera Guru

With code below running in Script Background, I should see about 20 rows where a user_name doesn't exists in the application table but I am getting 0 results.  Not sure what I'm doing wrong.  Also not sure if the following messages for file.reads and file.writes are an issue which I'm receiving when running script.

Compacting large row block
Expanding large row block
var sysDiffUtilarray = new ArrayUtil();
  var sysarray = [];
  var apparray = [];
  var sysuser = new GlideRecord('sys_user');
  var appuser = new GlideRecord('x_xxxxxx_app_table');
  var count = [];

  sysuser.query();
  while(sysuser.next())
  {
     sysarray.push(sysuser.username.toLocaleLowerCase());
  }

  appuser.query()
  while(appuser.next())
  {
     apparray.push(appuser.username.toLocaleLowerCase());
  }

  gs.info(sysDiffUtilarray.diff(apparray,sysarray));

  gs.info(count.length);

 

 

1 ACCEPTED SOLUTION

Renee-17
Tera Guru

I figured it out.  I had username instead of user_name and forgot to include a statement to increment count

View solution in original post

1 REPLY 1

Renee-17
Tera Guru

I figured it out.  I had username instead of user_name and forgot to include a statement to increment count