- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2024 11:53 AM
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);
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2024 12:28 PM
I figured it out. I had username instead of user_name and forgot to include a statement to increment count
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2024 12:28 PM
I figured it out. I had username instead of user_name and forgot to include a statement to increment count