The CreatorCon Call for Content is officially open! Get started here.

Mike S1
Tera Contributor

In my last post, I introduced the idea of scanning an Excel file loaded as a HR Case Bulk creation process. Let's see how we can leverage the GlideExcelParser to help support the bulk case uploader.

 

For this test, I wanted to provide a check that verifies that data rows beyond a header were actually added to the template file that was uploaded to the form. Once we know that, we can do some sort of message back to the user and if need be, stop the submission of the Record Producer. I kept everything server side for this test by just copying the script from the documentation into the Script field on my Record Producer and then making some adjustments.

 

The basic idea is that the system will cycle through the rows in the file and if the counter is under a threshold, it displays an error message, stops the submission of the form and then redirects back to the form to get an updated file from the user. I did this in the server script on my Record Producer.

MikeS1_0-1759838763158.png

 

I tested by making a template file with only a header and no detail rows, then uploading it to my form.

 

MikeS1_1-1759838763158.png

 

And as I hoped, the system prompted me to provide a new file with some actual data in it. I just did that with a gs.addInfoMessage in the Server script.

 

MikeS1_2-1759838763158.png

 

So I uploaded my original test file that actually had some data rows and hit submit.

 

MikeS1_3-1759838763159.png

 

The case creation process moved ahead as it should have and created my cases and set my request to completed.

 

MikeS1_4-1759838763159.png