Details
Enable Script-Based Formatting.

Edit Data Formatting Scripting.

Sample code:
// Default script for data formatting
var last_result = "";
function onResult (decodeResults, readerProperties, output)
{
if (decodeResults[0].decoded)
{
if(decodeResults[0].content == last_result)
{
output.content = ""; //user can set custom output string here
output.events.system = Event.system.validationFailure;
}
else
{
output.content = decodeResults[0].content;
last_result = output.content;
}
}
}- In this example, when the code read is the same as last time, the reader outputs nothing. User can modify the related “output.content” to output custom string.
- In this example, the reader outputs three types of Results Status. When the code read is the same as last time, Result Status is “Invalid”.
