- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi,
I have a requirement where if a person selects number of person as 1/2/5, then there are a set of fields that should be visible for 5 times or so. Is this possible to do, if yes how it can be implemented?
Thanks in advance!!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
you can use MRVS for this.
If user selected 2 let user fill 2 rows of MRVS
If user doesn't enter 2 rows, then you can validate this using onSubmit script.
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
that's not what I mentioned if you read the above comment properly.
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
The approach shown in the image below is what Ankur is suggesting, which is logically sound if you want the same fields populated for all users. You can also add a condition in the onSubmit script so that if the user selects '2' as the number of persons, then 2 rows of the Multi-Row Variable Set (MRVS) are populated accordingly.
An alternative approach would be to create each variable 5 times (for example, if you need 3 fields per person - Name, Phone, Email - you'd need to create 3×5 = 15 variables total) and show/hide them based on the selected user count. However, this approach is tedious and not considered a good practice.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @Community Alums ,
I understood the logic Ankur is trying to say. But the field 'number of variable set' will be outside the MRVS and based on the selection of that field, the variable sets should be visible. So how exactly will this work?
Thanks in advance!!
