Attachment Content Validation in Record Producer

surbhibarnw
Tera Contributor

Hi Everyone,

 

I have a requirement where Attachment content need to be validated according to the defined template before submitting a Record Producer. How I can achieve this?

 

Thanks in advance!

1 REPLY 1

Tanushree Maiti
Tera Patron

Hi @surbhibarnw 

If you want to validate attachment name, content type - it is easy BUT for content ,

In the script, you can explore to use  GlideSysAttachmentInputStream (Refer:https://www.servicenow.com/docs/r/zurich/api-reference/rest-api-explorer/r_ScriptedRESTExampleStream...)
 to read the attached file's stream, parse the rows/content, and validate against your defined template structure

 

 

 

Refer:

 

KB0723548 Is there an out-of-box way on how to check if an attachment has been added or not for a ca... 

https://www.servicenow.com/community/itsm-forum/validate-attachments-on-a-record-producer/m-p/704244

https://www.servicenow.com/community/developer-forum/attachment-validation-or-record-producer-catalo...

 

Please Accept the solution if it assisted you with your question & Mark this response as Helpful.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti