- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2018 11:18 PM
Hi,
i would like to hide text under QR Code image
1.can i hide text under barcode image????
2.Can i change QR code type to BAR Code type (||||) format??
If you please check it in my PDI, if you are with that
UI Action: Show Barcode , UI Script:prototype-barcode UI Page: barcode_gen
https://dev64572.service-now.com,
Test / 123
Thanks.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-08-2018 08:12 PM
Hi!
Based on the documentation of the plugin you are using, you need to configure the type of barcode you wish to use on the UI Page client script along with settings such as bar size, color, positioning and whether you wish to see the text under the barcode.
the correct line would be something like this:
$("bcTarget").barcode( $('mydata').value, "code128",{"barWidth":1, "barHeight":50, "showHRI":false});
Please note that not all barcode readers can read all barcode standards, and some of them are numeric-only, try to experiment with the actual barcode readers you intend to use.
To see the full set of settings:
http://barcode-coder.com/en/barcode-jquery-plugin-201.html
To experiment with how you wish your barcode to look like:
http://barcode-coder.com/en/barcode-online-generator-2.html
I took the liberty to implement this in your test instance with the original setting commented out
Regards,
David

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2018 12:13 PM
You can only send the parameter "sysparm_data" once, so I would actually do it like this:
function generateBar() {
var myBarcodeText = g_form.getValue('serial_number') + " - "+g_form.getValue('asset_tag')+" - "+g_form.getValue('manufacture');
// you should add something like a dash or semicolon to separate each value
var w = new GlideDialogWindow('barcode_gen');
w.setTitle('Barcode Information');
w.setPreference('sysparm_data',myBarcodeText);
w.render();
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2018 04:38 PM
Just applied the text to your instance, final code on the UI Action looks like this:
function generateBar() {
var myBarcodeText = g_form.getValue('serial_number') + " - "+g_form.getValue('asset_tag')+" - "+g_form.getDisplayBox('manufacturer').value;
// you should add something like a dash or semicolon to separate each value
var w = new GlideDialogWindow('barcode_gen');
w.setTitle('Barcode Information');
w.setPreference('sysparm_data',myBarcodeText);
w.render();
}
and the result looks like this (I'm showing text underneath to validate easier):
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-11-2018 06:39 AM
it is very wonderful information here.
Thanks a lot David