Can I limit the number of entries in a multi row variable set?

jrusso
Tera Expert

I would like to use a multi row variable set to collect direct deposit information, allowing employees to split their deposit into multiple accounts.  However, we would like to limit the number of accounts they can use.  Is there a way to set a maximum number of rows/entries?

1 ACCEPTED SOLUTION

Hi there,

You can set a limit to the number of rows that you can add to a multi-row variable set by using the max_rows attribute in the Variable Set attributes field.

Would that help? Don't see a reason for scripting this like others suggested.

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

Kind regards,
Mark
2020 ServiceNow Community MVP
2020 ServiceNow Developer MVP

---

LinkedIn
Community article list

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

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

LinkedIn

View solution in original post

13 REPLIES 13

Yes, you can. You can make use of Client script that uses Script include that checks for 9 digit in addition to Sachin suggested.

jrusso
Tera Expert

Thanks.  This worked perfectly.

jrusso
Tera Expert

Hi....thanks again everyone for the suggestions.  I have another related question.... is there a way to validate one variable response against another?  We want the user to enter a bank account number twice, with a validation that the second entry matches the first entry.  Is this possible through a client script as well?

Hi,

onchange on MRVS won't work; so you need to have onSubmit client script

1) get the value from MRVS

2) parse the json and then compare the values

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader