Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

Get specific Currency from Price field

conmic
Mega Guru

Hello SNC,

 

I need some advise:

 

In my Service Catalog I have items with multiple currencies for one item.

Now I'm working on a UI page where the user selects a currency and then the queried SC items should displaying with the previously selected currency.

But I'm unable to find a solution for this. Has anybody an idea how I should attack this?

 

I have already worked with these methods, but they cannot be used here: http://wiki.servicenow.com/index.php?title=Scripting_Currency_and_Price_Fields

 

Kind Regards,

Michel

 

 

EDIT:

I have already following code on my UI page:

 

"jvar_mrl_gr" is a GlideRecord query to the 'proc_po_item' table that is currently being executed by a while loop "jvar_mrl_gr.next()".

So what can I add into this g:evaluate tag, to get the USD currency of the queried item which one is defined in EUR on the Service Catalog?

 

                 <g:evaluate var="jvar_catalog_price" jelly="true">
                     var catPrice = jelly.jvar_mrl_gr.product_catalog.price;
                     catPrice;
                 </g:evaluate>
                 ${jvar_catalog_price}

1 ACCEPTED SOLUTION

conmic
Mega Guru

I have opened a ticket with HI and I have received a reply that works. However it uses a method that is not public, documented nor supported.


If you however want to know how I did it, please drop me a private message.


View solution in original post

9 REPLIES 9

conmic
Mega Guru

I have opened a ticket with HI and I have received a reply that works. However it uses a method that is not public, documented nor supported.


If you however want to know how I did it, please drop me a private message.


Was that solution specific to Service Catalog or can it be applied globaly? I have a custom table I need to show the original currencies on.


It's a server-sided solution that can be applied throughout the system:


- Script Includes


- Business Rules


- Background Scripts


- etc...



If you're interested, add me and I'll forward you the email that I received from ServiceNow Customer Service.


Hey Michel



I would like to hear about this way to display currencies


We came across a similar problem.


Our only alternative seems to be using the 'fx_rate' table to calculate manually.



Kind regards Tom de Boer