- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā03-21-2019 06:01 PM
Hi,
I am doing like this
var ga = new GlideAggregate(theTable); ga.addAggregate('COUNT', dpField); ga.addHaving('COUNT', dpField, '>', '1'); ga.query(); var arDupes = new Array(); while (ga.next()) { arDupes.push(ga.getValue(dpField)); } Unfortunately I am getting all array elements are same and last value.
But if I put his.info then it is logging different values.
Please help me why is this behaviour ?
Thanks
JG
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā03-21-2019 06:08 PM
I believe you meant when you do gs.addInfoMessage(ga.getValue(dpField)) you are getting different values ?
In such case just modify your line of code from
var arDupes = new Array();
to
var arDupes = [];
Try this and let me know what you get after iterating through the array ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā04-05-2019 02:23 AM
Dear All,
Thank you so much for your help.
I have cleared cached and restarted my machine and then it started working. I mean was getting values into array as expected.