
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-20-2018 02:31 PM
Looking for a How to:
Issue: We need to be able to print a Bar Code Label from ServiceNow!
Fields used for Information: Number / Asset Tag / PO / Serial Number
Have been told we will need the following:
1. Able to put in dimensions of label
2. Sequence Numbering for Equipment Tag ( Needs to be 8 digits )
3. Along with Bar Code want Asset Tag and Serial Number to also print on Label
4. Printer Type ( Zebra , Intermec ,Xerox, etc )
Can anyone point me in the right direction!
Mark
Solved! Go to Solution.
- Labels:
-
Service Level Management

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-22-2018 01:03 PM
Looking at some things online, looks like this has been solved already.
See: https://github.com/lindell/JsBarcode/
So I thought I'd give it a try.
I'm not sure how you'll solve the dimension issue but with this library it's not that bad.
Steps to recreate;
1. Create UI Script and copy/paste the library code from: https://cdn.jsdelivr.net/jsbarcode/3.3.20/JsBarcode.all.min.js
2. Create UI Macro with svg with id you will call later.
3. Create UI Formatter calling UI Macro name plus .xml
4. Add UI Formatter to form.
5. Add onChange script like so to form;
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
/*
* Run on load and on change.
if (isLoading || newValue === '') {
return;
}
*/
ScriptLoader.getScripts('jsbarcode.jsdbx', function() {
console.log('onchange');
JsBarcode("#code128", newValue);
/* JsBarcode("#ean-13", "1234567890128", {format: "ean13"});
JsBarcode("#ean-8", "12345670", {format: "ean8"});
JsBarcode("#ean-5", "12345", {format: "ean5"});
JsBarcode("#ean-2", "12", {format: "ean2"});
JsBarcode("#upc-a", "123456789012", {format: "upc"});
JsBarcode("#code39", "Hello", {format: "code39"});
JsBarcode("#itf-14", "1234567890123", {format: "itf14"});
JsBarcode("#msi", "123456", {format: "msi"});
JsBarcode("#pharmacode", "12345", {format: "pharmacode"});
*/
});
}
Then it works onload and onchange.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-22-2018 01:03 PM
Looking at some things online, looks like this has been solved already.
See: https://github.com/lindell/JsBarcode/
So I thought I'd give it a try.
I'm not sure how you'll solve the dimension issue but with this library it's not that bad.
Steps to recreate;
1. Create UI Script and copy/paste the library code from: https://cdn.jsdelivr.net/jsbarcode/3.3.20/JsBarcode.all.min.js
2. Create UI Macro with svg with id you will call later.
3. Create UI Formatter calling UI Macro name plus .xml
4. Add UI Formatter to form.
5. Add onChange script like so to form;
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
/*
* Run on load and on change.
if (isLoading || newValue === '') {
return;
}
*/
ScriptLoader.getScripts('jsbarcode.jsdbx', function() {
console.log('onchange');
JsBarcode("#code128", newValue);
/* JsBarcode("#ean-13", "1234567890128", {format: "ean13"});
JsBarcode("#ean-8", "12345670", {format: "ean8"});
JsBarcode("#ean-5", "12345", {format: "ean5"});
JsBarcode("#ean-2", "12", {format: "ean2"});
JsBarcode("#upc-a", "123456789012", {format: "upc"});
JsBarcode("#code39", "Hello", {format: "code39"});
JsBarcode("#itf-14", "1234567890123", {format: "itf14"});
JsBarcode("#msi", "123456", {format: "msi"});
JsBarcode("#pharmacode", "12345", {format: "pharmacode"});
*/
});
}
Then it works onload and onchange.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-09-2020 10:12 AM
Hi Jace,
Would you mind sharing on what is the filed you have selected on Onchange script?
Regards,
Ashrad.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-10-2020 12:06 PM
It was on "asset tag"

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-24-2018 01:05 PM
Would you mind sharing your screen prints on
2. Create UI Macro with svg with id you will call later.
3. Create UI Formatter calling UI Macro name plus .xml
4. Add UI Formatter to form.
This is new to me.