Set recurring price of choice list in onChange client script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-29-2019 10:22 AM
Hello,
I have a select box variable called data_amount
There are options 1, 10, 100, and other.
When other is selected, a text box called other_amount appears where the user can enter a number. When they enter the number here, I want to update the recurring price field on the choice other. Does anyone know how to do that?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-29-2019 10:54 AM
Slightly updated + tested in my personal developer instance. Instantly works!
If my answer helped you in any way, please then mark it as helpful.
Kind records,
Mark
---
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-29-2019 11:07 AM
Thanks Mark! But won't that be changing the price on the request after the request is submitted? I want to change the price on the question_choice table so that it updates the cart in the portal before the request is submitted.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-29-2019 11:14 AM
Well you could of course update the choice, but that would impact all future request if the recurring price is applicable by default and you not updating thru other_amount selection.
Also updating the choice value could have a collision if somehow two requests are entered on almost the same time. User A has other_amount 560, User B enters 5 seconds later other_amount 15000, then User A submits...
Kind regards,
Mark
---
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-01-2019 02:06 AM
Hi there,
Is your question solved with this? Do we need to follow-up on this?
Please mark this answer as correct if it solves your problem. This will help others who are looking for a similar solution. Also marking this answer as correct takes the post of the unsolved list.
Thanks.
Kind regards,
Mark
---
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-01-2019 03:26 PM
I am not sure what to do because the example you provided creates a new recurring price record and is after the request is created. I am trying to update the price shown in the cart before a request is submitted/created. So I want to update the recurring price field that already exists...