The CreatorCon Call for Content is officially open! Get started here.

Using Currency fields in GlideAggregate

aklimenko
Mega Expert

What is the best practice for using currency fields in GlideAggregate? It looks like GlideAggregate always uses system/reference currency. In our system we have expenses recorded in GBP and we have no problem processing them with a GlideRecord, but attempt to aggregate expenses always returns amount in USD.

Are there any way to specify target currency for GlideAggregate?   Or is there any alternative way to run aggregation queries on currency fields?

Thank you!

1 REPLY 1

manikorada
ServiceNow Employee
ServiceNow Employee

Alex,



I think you can't use GlideAggregate on currency fields, you can check this from Scoped GlideAggregate API Reference - ServiceNow Wiki


Also,you can use some additional methods such as http://wiki.servicenow.com/index.php?title=Scripting_Currency_and_Price_Fields


This will help you to do some manipulations.