Serial Number checks

I have a system that goes through about 30 serial numbers per batch, at the current time the operator is scanning in the serial numbers into the system. To prevent duplicate serial numbers from being scanned, I want to track the serial numbers that have been entered and if a duplicate is scanned, display something on the screen.

I am debating using a document tag and storing the serial numbers in a JSON format. I was thinking it would be a quick tag write as the serial number tag changed and then I could just read the document values and see if the serial number was there. It would be easy to clear at the end of the batch too. I could also just store them as an array.

I also thought about using a database but I don’t need to keep them after the batch is done so I felt this was a good but unnecessary storage.

Does anyone have any suggestions or pushes to get me off the paralysis from analysis stage! thanks

Others will know better but you could also use a dataset tag for this. Not sure if it's more efficient than JSON in a document tag though.

We have used this with datasets, JSON seems to be heavier on the gateway due to the inefficiencies of string operations.

Document tags internal form is not JSON, and should be relatively efficient. Particularly if you are using the serial numbers as keys in your document.