- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2020 06:25 PM
Hi all
I am working on a catalog client script (onChange script), which dynamically changes select box's options, based on requester's role.
If a user is an asset manager, I would like to add an option called "Keyboard", with a price. (Similar to what is shown below)
I was going through documentations of g_form, where I found the below function:
addOption(String fieldName, String choiceValue, String choiceLabel, Number choiceIndex)
I do know that I could set that in the "Question Choices", but if the user changed it to
Does anyone know if there is a way to add price to the newly added option?
Thank you.
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2020 06:46 PM
Currently there isn't a way to set a price on a dynamic option created via a script. The only way I've found to accomplish this is to use a lookup select box with a custom table where you can configure all of the options and include a value, label and price and then display the options you want based on a reference qualifier.
Wish there was a better answer!
If this was helpful or correct, please be kind and click appropriately!
Michael Jones - Proud member of the CloudPires Team!
Michael D. Jones
Proud member of the GlideFast Consulting Team!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2020 06:35 PM
Hi V.W,
So you need to update the price based on the select box choice or is it only for the choice label.
If yes, then you can follow this link.
This link will help you :
Mark helpful and correct if it helps.
Thanks,
CB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2020 06:46 PM
Currently there isn't a way to set a price on a dynamic option created via a script. The only way I've found to accomplish this is to use a lookup select box with a custom table where you can configure all of the options and include a value, label and price and then display the options you want based on a reference qualifier.
Wish there was a better answer!
If this was helpful or correct, please be kind and click appropriately!
Michael Jones - Proud member of the CloudPires Team!
Michael D. Jones
Proud member of the GlideFast Consulting Team!
