How to generate error message for an attached spreadsheet before submitting a catalogue item

matthew_hughes
Kilo Sage

I've got a catalogue item that involves submitting a spreadsheet. At the moment, if there are any issues with the data within the spreadsheet, it generates error messages on the work notes of the RITM:

matthew_hughes_0-1736956664460.png

This is produced via a script include. However, I was just wondering if there is a way I could apply the same functionality in my script include so that if a user clicks Submit and there are issues with the data within the spreadsheet, it would generate those errors in a pop up box, and prevent the user from submitted their request.

5 REPLIES 5

Ankur Bawiskar
Tera Patron
Tera Patron

@matthew_hughes 

something like this which I shared might help, but you will have to enhance

validate the excel parser in catalog item 

the above will work for native but if you wish to use for portal then you can do this

1) have attachment variable type, let user add file

2) then have onChange script validate that excel and show the error in alert via GlideAjax

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

@matthew_hughes 

Hope you are doing good.

Did my reply answer your question?

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

Hi @Ankur Bawiskar I'm exploring the option with the people I'm working with. I appreciate your help.

@matthew_hughes 

I believe I already shared link for the solution.

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