Can a list of scanned barcodes be edited after an error?

Thomas Wright1
Tera Contributor

Hey folks,

I'm building some scanning functionality in the Agent app against assets in Transfer Orders.

I've got multi-scanning enabled (MaxEntries attribute >1). When I'm throwing addErrorMessage the user is kept on the submission page of the scan which I quite like.

I'm wondering if I can edit the list of scanned barcodes as part of the response of the WriteBackAction script so that only the ones that threw an error are left in the list, I've tried to edit parm_input.asset_ids without success.
Anyone know of a way?

4 REPLIES 4

GetupNow
Tera Contributor

Hi Thomas, Hoe you are doing good. Did you find a way to achieve this functionality?

GetupNow
Tera Contributor

Hi Thomas, Hope you are doing good. Did you find a way to achieve this functionality?

Community Alums
Not applicable

Hello Thomas,

 

I was also trying the Same, Once user have submitted with multiple scan results, in the review List user should see only the Errored Items, Did you get any resolution for your Query?

Hi Sadeesh, unfortunately not. I submitted a ServiceNow ticket and was told it's not possible to change the list of scanned barcodes from the script, so instead I handled the barcodes that were already validated so they didn't make any further changes to the transfer order line tasks that had been marked as closed. I show error messages for each failed barcode with adderrormessage so the user can rescan as many barcodes as required and submit the whole list again. The script handles which barcodes were already scanned, would error again and not make any changes, and the newly scanned barcodes which would make changes.

For this to work I had to add some custom fields to the transfer order line task table for the scanned barcode, scanned status (success/error), and scanned asset. There's also some somewhat complex logic which swaps assets in on the first task of the workflow, assuming they are in the same stockroom and with the same model.