Display barcode from javascript library in a ui page

SamiranD
Tera Contributor

I want to call the javascript library JSBarcode to display custom barcodes , whenever i click on a ui action in a form. I have created an ui action and on clicking it i have created an ui page which is coming as a pop up. I want to display the barcode in the pop-ups. Now where to write the javascript code to write in the ui page? is it in the html section? and do i need to write anything in the Client script section or processing script section. I need to fetch some values from a servicenow table also and pass it to create the barcode. Please help

 

1 ACCEPTED SOLUTION

@SamiranD 

it should work as per script shared in 1st link

are you in global scope or scoped app?

what's your requirement? generate barcode from which fields and where to display?

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

7 REPLIES 7

@SamiranD 

it should work as per script shared in 1st link

are you in global scope or scoped app?

what's your requirement? generate barcode from which fields and where to display?

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

i have to generate barcode from the serial no field of alm_hardware table. But in the 1st link, it is trying to get the manual user input of the asset values. 

I am confused here very much. Can you help me in understanding or writing the code fo the UI Action and the UI page?

 

ben_hollifield
Tera Guru

@Ankur Bawiskar has great suggestions here for the DIY crowd. If you're looking for a plug-and-play solution, Yansa Labs offers a Barcode & QR Code Generator on the ServiceNow Store that can accomplish exactly what you're after.