Validating bar code scans from reference data

When we use a drop-down and populate it with reference data, it allows the user to select only from the options provided. If we change the drop-down to a bar code field, it allows any bar code to be scanned in, even if the value scanned in is not in the reference data. The feature requested here is to do a validation so that if the bar code scanned in is not a valid value in the reference data, it does not accept it or gives an error.

2

Comments

1 comment
Date Votes

Please sign in to leave a comment.

  • Hi Narayan,

    Thank you for sharing this feedback with us!

    In the meantime, I have a workaround for you which is a little funky, but does help notify a user when they've entered an invalid barcode (based on the Reference Data). Essentially, we will set up a validation message and error message using conditional logic based on the Barcode field's value. See below: 

    1. In your Reference Data spreadsheet, add a column beside your barcode number column and populate each cell with the number '1'. Download the CSV, and either update your existing Reference Data file or upload a new one.

    2. Point the Barcode field's Reference Column selection to the Barcode column in your CSV.

    3. Add a Number field and give it a name -- I called it "Validation" but it doesn't really matter since it is just going to do some background work for us to determine the validity of an entry. We'll end up hiding this from the mobile view regardless, to keep things simple. 

    Set up the Reference Data information to point to the column containing the 1s (I called mine Validation), and reference the previous Barcode field.

    Expand the More menu and uncheck the box that says "Mobile Visible".

    4. Now we set up the messaging. Add a Static Text field to your App, and give it a value of something along the lines of "Your barcode has not been entered or is invalid". 

    Add a Field Condition to this Static Text field to only show when the Validation field is NOT EQUAL to 1.

    (Because the absence of a value is considered invalid, this message will show by default, hence why it addresses the two reasons for its presence. Once a valid value is entered in the Barcode field, it will reflect a success message in its place -- you'll see in Step 5.)

    5. Copy the field you just created, or add another Static Text field, and name it "Your barcode is valid." or something of that nature. 

    Set up the conditions to show when the Validation field is EQUAL to 1. 

    This is your success message. Ideally, you'll see this most of the time, but you'll know that if you enter a barcode and it doesn't change the other message to this, the entry is invalid. 

    This is what it looks like in the App once it's all set up:

    I hope this helps in the meantime! Like I said, it's a bit funky but hopefully it does the trick for now...

    Thanks,
    Siobhan

     

    1

Didn't find what you were looking for?

New post