- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2023 06:45 PM
Hi All ,
While submitting catalog , we have field line manger , ' If line manger not listed we have made line manager approval doucment mandtory '
as u can see in the below snip
it is only 1 document , if we attach more it not going to submit to solve this issue .
Please provide me steps .
Thanks in Advance
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2023 08:42 PM
you can check if the field is empty in onSubmit catalog client script and check if attachment is present or not
check my blog for the same
Verify Mandatory Attachments Count on Catalog Item
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2023 09:09 PM
Hi @nameisnani ,
As far as I understand your situation : If you just attach 1 then it works, if it is more than 1 then it won't allow you.
If this is the case can you share us the code which you've written to validate this.
Please mark correct if my response has solved your query.
Cheers,
Mohammed Basheer Ahmed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2023 09:17 PM
Hi @nameisnani,
I would suggest to use the Attachment type variable and using Catalog UI policy you can make it mandatory based on conditions.
Thanks,
Sagar Pagar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2023 08:31 PM
Hi, without any details of your script\code the forum cannot review and advise a solution. based on your partial screenshot, your code is not checking to see if there is an attachment added to the record?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2023 08:42 PM
you can check if the field is empty in onSubmit catalog client script and check if attachment is present or not
check my blog for the same
Verify Mandatory Attachments Count on Catalog Item
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2023 09:09 PM
Hi @nameisnani ,
As far as I understand your situation : If you just attach 1 then it works, if it is more than 1 then it won't allow you.
If this is the case can you share us the code which you've written to validate this.
Please mark correct if my response has solved your query.
Cheers,
Mohammed Basheer Ahmed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2023 09:17 PM
Hi @nameisnani,
I would suggest to use the Attachment type variable and using Catalog UI policy you can make it mandatory based on conditions.
Thanks,
Sagar Pagar