How can I set the price of a dynamic select box variable option from a Service Catalog client script?

Stephen W_
Giga Guru

I have a variable set of 'Select Box' variables attached to a service catalog item.

I use a catalog client script to set each question and populate the choice lists.


I populate the choice lists with

g_form.addOption(<var name>, <option value>, <option label>);

 

How do I now set the price for that option?

Thanks,

 

-Stephen

14 REPLIES 14

I've actually raised an issue with ServiceNow regarding the broken addOption() functions.(using addOption on a list that already contains pre-configured items with prices, will break all price updates on the page)  



For the time being, the only way to do this is to use a lookup select box linked to a table with a complex reference qualifier.     The select box's price should then be linked to a currency field.


Hi


Do you a soution to this?


Did u get any response from ServiceNow on this?


Stephen W_
Giga Guru

I did speak with someone from ServiceNow, and at the time the answer was that it cannot be done.


It was an oversight in the design of add/remove options.



My solution involved a somewhat complicated DOM manipulating client script.


It's very much purpose built, so it probably wouldn't work well in other environments..


himani_sharma
Kilo Expert

Hi


I raised this issue in High and they will have an enhancement on it.This is a functionality which is not present.


Hello,



Was the functionality already added?



Thanks,


Karel