Record producer restrictions in attachment

Community Alums
Not applicable

Hi Everyone 

@Ankur 

In record producer if we submit a incident in record producer than we need to restrict type of attachment for example if we attach pdf docs jpeg text are acceptable else return error message please select correct type of attachment.I want restriction for docx ,txt, jpeg, txt.

So I don't want to create new attachment variable or don't want to set the system properties.

I want client script for this use case please help me 

 

Regards

Deepshikha 

4 REPLIES 4

Sai Kumar B
Mega Sage
Mega Sage

@Deepshikha Pandey 

You can find your answer in this article - Check attachment file type-client script

Community Alums
Not applicable

Thank you..this is for only CSV file i want to restrict for txt docx jpeg txt

Regards

 Deepshikha

@Deepshikha Pandey  In the above article replace the CSV format as per your requirement and modify the code.

 

if ((value.indexOf('.csv')>-1)){  //Replace the .csv with your format

Ankur Bawiskar
Tera Patron
Tera Patron

@Deepshikha Pandey 

As per link shared by Sai you can follow that.

I had shared solution for this 3 years ago. Please enhance it from your side.

Regards
Ankur

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