Increment and Decrement

Scan a Barcode to Increase or Decrease a Numeric Value in a Database

The increment/decrement middleware feature provides a simple way to increase or decrease pre-assigned numeric values within the response text of a validation database.

The ability to increase or decrease those values based on a scan action can be useful for a variety of applications, such as inventory tracking – i.e. changing the quantity of inventoried items. [Note: This feature changes the value in the validation database stored on codeREADr.com. If you also have an inventory database in Excel, Sheets, or another database program, you can export this database as a CSV file to import elsewhere.]

The scan action can simply be the result of a scan alone or it can be the result of the app-user entering a number within a post-scan prompt. Generally you would configure one service to increment and another service to decrement the same values in a single, shared database.

Instructions

Setting up an increment/decrement question for a service is fairly simple, but there are instructions that must be followed in order for the feature to work as intended.

1. Create Service

Create a Validation Scans with a Database service type. Select “Online in Real Time”. Then, select a database and make sure the status of duplicates is set to “Valid”. You can then click ‘Create Service’ at the bottom.

2. Name Service

In naming the service, a good practice is to indicate whether it’s an Increase or a Decrease service.

3. Fixed Value of Increment/Decrement

Using this option, every scan the app-user makes will either increment or decrement the database value based on the Default you choose and Status you choose (All or Valid or Invalid).

4. Variable increment/decrement based on the quantity input by the app-user

Using this option, the app-user enters a quantity when prompted after a scan. The increment or decrement will be based on that quantity.  

When creating your service, under the Questions tab you add a question with the answer type Short Answer with numeric entry, or Multiple Choice/Dropdown with the answer options only containing numbers. [Note: The first answer of a Dropdown question is automatically submitted so if ‘1’ is the most common answer then put that as your first answer.]

After creating this question, drag it to “Ask After Submitting a Valid Scan” section of the questions menu then save you Question workflow.

On the Advanced step under the “Capturing – Edit middlewares” header check “Increment/Decrement Value”. Here, you will choose ‘With Question” then choose the question you created and whether it increments or decrements the value in the database. You must then specify a delimiter.

4. Delimiters

There needs to be a delimiter so the app knows which value to change within the database’s response text. Generally the delimiter you choose should not be used in the response text anywhere except for this purpose. If it is, then it must be enclosed with brackets. It will then appear like this in your database and in the post-scan response:

  • Candy Bar {price}1.75{price}
  • 2×6 10’ Studs {amount}10{amount}

The delimiter can also be just a symbol such as an asterisk * or a bat | or a dash – or an underline _ all of which you can enter without brackets if not anywhere used else in the response text. Symbols will appear like this in your database and in the post-scan response:

  • Current bin quantity is *10*
  • Remaining _100_

5. Importing and Exporting Databases

  1. On the Databases page you can import, add, update and export your databases. For this feature, your database must have the delimiter in the response text (column 2) surrounding the numeric value to be incremented and/or decremented.  When a scan is submitted, that numeric value will be altered by the increment or decrement specified.

To get a history of the action taken you can view, filter and export your scan records on the Scans page.

6. Add Another Value

This option allows you to have more than one value incremented or decremented within the same database. The delimiter will need to be different for each value.

7. Advanced: Alter Response

There are advanced options to change the in-app view of the response text. Email support@codereadr.com or reach out on our website’s Chat Now option.

in Databases