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

Ankur Bawiskar
Tera Patron
Tera Patron

@SamiranD 

can you share what did you try so far and what's expected?

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

Ankur Bawiskar
Tera Patron
Tera Patron

@SamiranD 

did you check these links?

Show/print a barcode in a form using JsBarcode 

How can I Print Bar code Labels 

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

i checked the 1st link, but i am not able to configure it since, i am new to jelly script.

 

SamiranD
Tera Contributor

i have created an ui action, and one ui page. i have called the ui page in the ui action. in ui page i am trying to call the javascript library JSBarcode through uploading it in a ui script. But not getting the svg image in the pop up window. IS my approach correct