How to scan selected number on Barcode?

  • directdelivery
    Domanda del 24 maggio 2024 alle ore 09:30

    Buonasera,

    per questo modulo che ho creato avrei una domanda per la funzionalità di scansione del Barcode.

    se vede le risposte che ho raccolto, la scansione ha funzionato ma non mi interessa l'intero numero, soltanto le ultime 8 cifre. Ad esempio: di questo vorrei avere solo 00494158350038561121 --> 38561121. E' possibile impostare la scansione in modo che conservi solo le ultime 8 cifre del codice?

    Grazie,

    Riccardo


  • Angeli Jotform Support
    Risposta del 24 maggio 2024 alle ore 09:56

    Hi directdelivery,

    Thanks for reaching out to Jotform Support. Our Italian Support agents are busy helping other Jotform users right now, so I'll try to help you in English using Google Translate, but you can reply in whichever language you feel comfortable using. Or, if you'd rather have support in Italian, let us know and we can have them do that. But, it might take a while until they're available again.

    Now, coming back to your question, I’ll need a bit of time to look into this. I’ll get back to you as soon as I can.

    Thanks for your patience.

  • Angeli Jotform Support
    Risposta del 24 maggio 2024 alle ore 14:01

    Hi directdelivery,

    We really appreciate your patience and understanding while we’re looking into this. Unfortunately, it's not possible for the Barcode Scanner to only scan the last 8 digits of the barcode. A workaround is to pass the Barcode ID to a field and extract it using the Substring widget. I'll walk you through setting that up:

    1. Add a Short Text field and Hide it.

    How to scan selected number on Barcode? Image 1 Screenshot 80

    2. Go to Form Settings and set the Clear Hidden Field Values to Don't clear.

    How to scan selected number on Barcode? Image 2 Screenshot 91

    3. Create a condition to copy the Barcode ID to the Short text field.

    How to scan selected number on Barcode? Image 3 Screenshot 102

    4. Next, add a Substring widget.

    How to scan selected number on Barcode? Image 4 Screenshot 113

    5. Copy the Field ID of the Short Text field.

    How to scan selected number on Barcode? Image 5 Screenshot 124

    6. Then, paste it in the Substring widget.

    7. If the total number for Barcode ID is 20, you can add the 12th number in the Substring start and the 20th number in the Substring text.

    How to scan selected number on Barcode? Image 6 Screenshot 135

    Here's the result in my sample form:

    How to scan selected number on Barcode? Image 7 Screenshot 146

    You can clone this demo form to test or inspect.

    Give it a try and let us know how it goes.

  • directdelivery
    Risposta del 27 maggio 2024 alle ore 04:10

    Great! Perfect! Thank you it works!