How to check the type of attachment user has attached in service portal as variable answer

Imtiyaj Mulla
Tera Contributor

While requesting the catalog item if user has attached the file. I want to check the type of the attachment and allow only xlsx or pdf file type.

@Ankur Bawiskar

2 REPLIES 2

Ankur Bawiskar
Tera Patron
Tera Patron

@Imtiyaj Mulla 

you can use attachment type variable and allow only xlsx or pdf

Types of service catalog variables 

allowed_extensions =xlsx;pdf

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Ankur Bawiskar
Tera Patron
Tera Patron

@Imtiyaj Mulla 

if you still want to use paper-clip icon then check this link where I shared script to know file extensions of attached file

So enhance as per that

Check attachment file type-client script 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader