How can I set the price of a dynamic select box variable option from a Service Catalog client script?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2014 01:55 PM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-26-2014 03:26 PM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2016 12:34 AM
Hi
Do you a soution to this?
Did u get any response from ServiceNow on this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2016 09:21 AM
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..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2016 03:08 AM
Hi
I raised this issue in High and they will have an enhancement on it.This is a functionality which is not present.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2017 08:36 AM
Hello,
Was the functionality already added?
Thanks,
Karel