- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
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.
I tested by making a template file with only a header and no detail rows, then uploading it to my form.
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.
So I uploaded my original test file that actually had some data rows and hit submit.
The case creation process moved ahead as it should have and created my cases and set my request to completed.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.