
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2023 11:09 AM
Hi Folks,
When using the "Attachment" catalog variable type, is there a way I can mandate file attachments be a specific type? Say PDF? We have a requirement to mandate files be PDF on a specific catalog item. Is this possible in ServiceNow?
Thanks in advance.
Solved! Go to Solution.
- Labels:
-
Request Management
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2023 11:14 AM
In Variable attributes you can restrict the attachment type by extensions.
For example:
You can use allowed_extensions=pdf;txt etc
Please find the link here , solved in community,
If my answer solved your issue, please mark my answer as ✅ Correct & 👍Helpful based on the Impact.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2023 11:14 AM
In Variable attributes you can restrict the attachment type by extensions.
For example:
You can use allowed_extensions=pdf;txt etc
Please find the link here , solved in community,
If my answer solved your issue, please mark my answer as ✅ Correct & 👍Helpful based on the Impact.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2023 03:10 PM
Hi Jon,
I have OnSubmit Client Script to check if there is attached attachment with correct extension.
function onSubmit() {
var CSR_required = g_form.getValue('would_you_like_it_to_create_the_private_key_and_csr');
var att = this.document.getElementsByClassName('get-attachment').length; //[0].innerHTML;
if (CSR_required == "No") {
if (att == 0) {
alert("Please attach the Required CSR file to proceed with submitting.");
return false;
} else {
for (var i = 0; i < att; i++) {
var file_name = this.document.getElementsByClassName('get-attachment')[i].innerHTML;
if (file_name.indexOf('.csr') != -1) {
return true;
} else {
alert("Please attach the file with .csr extension to proceed with submitting.");
return false;
}
}
}
}
}