Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

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

Hello Michel,



Can you please share with me the email from servicenow , i am having a similar functional need where the itil user selects a currency and the price should be converted.



Thank you so much for your help.



Best Regards,


filip11
Giga Contributor

Hello Michel,



I am trying to contact you for the last 2 weeks, but due to the way personal messages work around here, I am not able to. Can you please share the details of the solution with me? You should be able to PM me, since I am following you...



Thank you very much.



Kind regards,


FV


heekiang
ServiceNow Employee
ServiceNow Employee

hi Michel



I would like to do the same.



Could you send me the information on this?



thanks



Hee Kiang


make it public...


jagarnath2
Mega Contributor

Hi Michel,


I would like to convert check box prices to its actual values   for a user located in London.



In the Dollar an item costs 100USD, however when this user selects this item , it shows same 100POUND which is incorrect.


I need to change the actual price conversion   when this user orders this   item.(check box variable)



Could you please assist me on this ?



Thanks,


Jagarnath