# Generate Complex/alphanumeric barcode playing with fields

**URL:** <https://forums.knack.com/t/generate-complex-alphanumeric-barcode-playing-with-fields/8032>\
**Category:** Ask Developers\
**Created:** [November 26, 2014, 5:45pm UTC](https://forums.knack.com/t/generate-complex-alphanumeric-barcode-playing-with-fields/8032 "2014-11-26T17:45:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![StevanLECO51061](https://avatars.discourse-cdn.com/v4/letter/s/e47c2d/32.png) [@StevanLECO51061](https://forums.knack.com/u/StevanLECO51061)\
**Post date:** [November 26, 2014, 5:45pm UTC](https://forums.knack.com/t/generate-complex-alphanumeric-barcode-playing-with-fields/8032/1 "2014-11-26T17:45:05Z")

</div>

Just a quick post after going through "Knack cook book" about how generate a simple numeric bar code. Here is how I generate automatically complexe/alphanumeric barcodes without touching CSS just playing with fields:

**1.I have in my DB a field for Article number :**

in the example : **1A2B2C3DZZZ854**

**2. Find out a free barcode online generator**.

in the following example [http://www.barcodesinc.com/generator/index.php](http://www.barcodesinc.com/generator/index.php)

I guess the following will also be possible with other services.

**3. Set the wished format in the bar code generator.**

Enter the code value and set the typeof barcode .

in this example, I set the type of barcode as 128B and "draw value text" and height 55 width 250 in the advanced options.

**4. Click on the generated barcode and check the URL**

it will display the png file url with the following structure : [http://www.barcodesinc.com/generator/image.php?code=](http://www.barcodesinc.com/generator/image.php?code=) **1A2B2C3DZZZ854** &style=196&type=C128B&width=250&height=55&xres=1&font=3

**5. Create a short text field "Barcode url 1" with default value :**

[http://www.barcodesinc.com/generator/image.php?code=](http://www.barcodesinc.com/generator/image.php?code=)

**6. Create 1 short text field "Barcode url 2" with default value :**

&style=196&type=C128B&width=232&height=55&xres=1&font=3

**7. Create a text combo field "Barcode url"**

"Barcode url 1" "Article code" "Barcode url 2"

**8. Create an image field "Barcode"**

option "load images from an external url"

and create a conditional rule : set "to a record value" : "Barcode url"

Using this trick, your data base will generate automatically a complex bar code on every form submission.

Enjoy.

---

<div class="post-metadata">

**Author:** ![GavinColem53431](https://avatars.discourse-cdn.com/v4/letter/g/d26b3c/32.png) [@GavinColem53431](https://forums.knack.com/u/GavinColem53431)\
**Post date:** [March 1, 2017, 12:02am UTC](https://forums.knack.com/t/generate-complex-alphanumeric-barcode-playing-with-fields/8032/2 "2017-03-01T00:02:21Z")

</div>

Hi Stevan,

Did you then have any requirement to integrate barcode scan functionality if a barcode already existed and required scanning from a mobile device ?  
  
If so, how were you able to achieve this ?

---

<div class="post-metadata">

**Author:** ![StevanLECO51061](https://avatars.discourse-cdn.com/v4/letter/s/e47c2d/32.png) [@StevanLECO51061](https://forums.knack.com/u/StevanLECO51061)\
**Post date:** [November 26, 2014, 6:21pm UTC](https://forums.knack.com/t/generate-complex-alphanumeric-barcode-playing-with-fields/8032/3 "2014-11-26T18:21:44Z")

</div>

Welcome . Great things can be done with fantastic Apps... I should thank you all at Knack instead.

---

<div class="post-metadata">

**Author:** ![Brandon](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.knack.com/brandon/32/255_2.png) [@Brandon](https://forums.knack.com/u/Brandon)\
**Post date:** [November 26, 2014, 6:07pm UTC](https://forums.knack.com/t/generate-complex-alphanumeric-barcode-playing-with-fields/8032/4 "2014-11-26T18:07:17Z")

</div>

This is a fantastic post, thanks so much!!!
