GlideAggregate MAX Returning Multiple Values Instead of a Single Maximum Value
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
Hi All
I'm testing GlideAggregate with a MAX aggregate
var ga = new GlideAggregate('incident');
ga.addAggregate('MAX', 'u_cost');
ga.query();
while (ga.next()) {
gs.print('MAX=' + ga.getAggregate('MAX', 'u_cost'));
}
Expected result:
MAX=300
Actual result:
MAX=
MAX=1
MAX=100
MAX=200
MAX=300The u_cost field is of type Integer.
when i use this
if (ga.next()) {
gs.print('MAX=' + ga.getAggregate('MAX', 'u_cost'));
}
i get
MAX=
The aggregate appears to be returning values separately for each u cost value instead of a single MAX value.
Any suggestions on why GlideAggregate is not returning a single MAX value
0 REPLIES 0
