Set recurring price of choice list in onChange client script

Hannah C
Giga Expert

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?

11 REPLIES 11

Mark Roethof
Tera Patron
Tera Patron

Do be aware that you might need to do some validation on the other_amount variable, because this is a single line text field.

As of Madrid, there is a nice feature for this: Validation Regex.

find_real_file.png

You might have to add a Currency regex, see below.
This is also explained in one of my articles: https://community.servicenow.com/community?id=community_article&sys_id=f5b8a988db057300d82ffb2439961...

find_real_file.png

If my answer helped you in any way, please then mark it as helpful.

Kind regards,
Mark

---

LinkedIn

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

Oh yay! I've been wondering why that wasn't an option, that'll be a very nice feature. I am currently in London but that will be very helpful once we move to Madrid.