
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-26-2011 12:21 PM
We would like the ability to print out asset receiving forms to send to our vendors. These forms would have data from the system, mostly in the form of text fields and the like, but they would also have barcodes. These would simply be a representation of the asset serial numbers in a special "barcode" typeface. Has anyone done this before? Any idea how we can implement this? Thanks!!
Solved! Go to Solution.
- Labels:
-
Enterprise Asset Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-02-2011 02:49 PM
That's pretty cool! It worked well for me. I put the code39.js code in a UI Script named "code39" and then included it on a UI Page with the HTML:
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<g:include_script src="code39.jsdbx"/>
<div id="externalbox" style="width:5in">
<div id="my_barcode" />
</div>
</j:jelly>
And then UI Page's Client Script is:
$("my_barcode").innerHTML=DrawCode39Barcode("123456789",1);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-26-2011 01:30 PM
This would be an interesting idea. I have not done this before, but one thought I had was related to the Service-Now new ODBC Driver. If you are using some third party software to generate barcodes, you may be able to connect to your Service-Now instance with the ODBC driver to get the data you want to import it into the barcode software. Hopefully someone else has done something with barcodes. I would be interested too.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-26-2011 06:10 PM
There are some websites that will generate barcodes for you. Here's a quick UI Page I put together that could be displayed by a UI Action button, etc. You'd need to access it something like this where "the_ui_pages_sys_id" is the sys_id for the UI Page you create and "sysparm_barcode" gets the barcode you want to see:
ui_page.do?sys_id=the_ui_pages_sys_id&set_request_params=true&sysparm_barcode=123456
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<div>
<img class="chart" src="http://www.barcodesinc.com/generator/image.php?code=${HTML:sysparm_barcode}${AMP}style=197${AMP}type=C128B${AMP}width=200${AMP}height=50${AMP}xres=1${AMP}font=3" />
<img class="chart" src="http://chart.apis.google.com/chart?chl=${HTML:sysparm_barcode}${AMP}chs=200x200${AMP}cht=qr${AMP}chld=H|0$" alt="Generated QR Code" />
</div>
</j:jelly>
The class="chart" portion is important because otherwise Service-now pages ignore images when they print without it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-02-2011 01:26 PM
I am trying to print out bar codes as well, as much as I would like to use the previously listed solution I'm hesitant to make my solution on an outside website for barcode generation. I've found a few javascript libraries that are able to generate barcodes but have not had any luck including the script library in a UI page to be able to reference it. I receive multiple syntax errors on page save when I attempt to include the script. However when I test the script via a simple html page outside of Service-Now it works fine. Has anyone had similiar issues and or found a workaround?
Javascript I'm trying to use:
http://www.codeproject.com/KB/HTML/Code-39-Barcode.aspx
Thanks,
Bryan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-02-2011 02:49 PM
That's pretty cool! It worked well for me. I put the code39.js code in a UI Script named "code39" and then included it on a UI Page with the HTML:
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<g:include_script src="code39.jsdbx"/>
<div id="externalbox" style="width:5in">
<div id="my_barcode" />
</div>
</j:jelly>
And then UI Page's Client Script is:
$("my_barcode").innerHTML=DrawCode39Barcode("123456789",1);