how to restrict number of rows in a variable set
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-05-2024 06:01 AM
how to restrict number of rows in a variable set

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-05-2024 01:38 PM
If you mean, how do you restrict the number of rows that a user can enter in a specific Multi-Row Variable Set, then you would need to open the variable set record and include max_rows in the Variable Set attributes field. For example, if you entered max_rows=10 then the user would only be able to enter 10 rows, after which the "add" button would no longer be active.
If you mean limit the number of rows for ALL variable sets, there is a system property that you can set, which would make this global, which is outlined here:
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0818277
Michael D. Jones
Proud member of the GlideFast Consulting Team!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-05-2024 11:13 PM
To restrict the number of rows in a variable set in ServiceNow, you can use a client script. Here are the steps:
1. Navigate to Service Catalog > Catalog Definitions > Maintain Items.
2. Open the item that contains the variable set.
3. Click on the variable set name to open it.
4. Click on "Client Scripts" related list.
5. Click on "New" to create a new client script.
6. In the "Name" field, enter a name for the script.
7. In the "Type" field, select "onChange".
8. In the "Script" field, enter the following script:
javascript
Replace 'your_variable_set' with the actual name of your variable set.
9. Click on "Submit" to save the client script.
For asking ServiceNow-related questions try this :
For a better and more optimistic result, please visit this website. It uses a Chat Generative Pre-Trained Transformer ( GPT ) technology for solving ServiceNow-related issues.
Link - https://nowgpt.ai/
For the ServiceNow Certified System Administrator exams try this :
https://www.udemy.com/course/servicenow-csa-admin-certification-exam-2023/?couponCode=NOW-DEVELOPER
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-06-2024 02:42 AM
Hi @Anusha Anus ,
Refer below links
Mark it as helpful and solution proposed if it serves your purpose.
Thanks,
Anand