- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-15-2025 05:59 AM
Hi All,
I have a requirement where I have to measure the size of the attachment while submitting the catalog item.
The attachment should not be more than 10 KB. If it is more than 10 KB then it should throw an alert and abort the action. Hence user will not be able to submit the catalog item with that file.
or, is there any way to check the number of rows in the CSV file up to 20 records? If there is more than 20 records it will abort the action and user wont be able to submit the cat item.
Kindly help how to achieve this requirement.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-15-2025 10:32 PM
you should use Attachment type variable with this variable attribute
Also check this link for onchange client script to validate the rows, you will have to enhance it by using CSV Parser
Validating an attachment variable
Check docs for more help
Types of service catalog variables
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-15-2025 10:54 PM
Would you mind closing your earlier questions by marking appropriate response as correct?
Members have invested their time and efforts in helping you.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-16-2025 12:25 AM
Thanks @Ankur Bawiskar , it worked.