Since the Standard/Custom Item Fields on Item Label cannot be printed in an Advanced PDF/HTML Template, the user can create a Saved Search that pulls the desired results and create an Advanced PDF/HTML Template to print the Custom/standard fields. Below is an example where a user wishes to print Barcodes for serial/lot number and print the display names as well.
Create saved search:
- Navigate to Lists > Search > Saved Searches > New.
- Click Item.
- Enter Search Title. (Ex. Item Label - Barcodes)
- Under Criteria > Standard > Filter >
- Add:
- Type: Inventory
- Serial/Lot Number: is not empty
- Click on Results tab.
- Add or Remove fields depending on the need.
- (eg. Date, Serial/Lot Number, Name, Display Name)
- Save
Create the Advanced PDF/HTML Template:
- Navigate to Lists > Search > Saved Searches > Edit the Search Created Above
- Click on New Template
- On the top right corner > Click on Source Code to switch to Code Editor
- Delete EVERYTHING from the Editor
- Use the following code instead:
<?xml version="1.0"?><!DOCTYPE pdf PUBLIC "-//big.faceless.org//report" "report-1.1.dtd">
<pdf>
<head>
<#if .locale == "ru_RU">
<link name="verdana" type="font" subtype="opentype" src="${nsfont.verdana}" src-bold="${nsfont.verdana_bold}" bytes="2" />
</#if>
<style type="text/css">table {
<#if .locale == "zh_CN">
font-family: stsong, sans-serif;
<#elseif .locale == "zh_TW">
font-family: msung, sans-serif;
<#elseif .locale == "ja_JP">
font-family: heiseimin, sans-serif;
<#elseif .locale == "ko_KR">
font-family: hygothic, sans-serif;
<#elseif .locale == "ru_RU">
font-family: verdana;
<#else>
font-family: sans-serif;
</#if>
font-size: 9pt;
table-layout: fixed;
}
th {
font-weight: bold;
font-size: 8pt;
vertical-align: middle;
padding: 5px 6px 3px;
background-color: #e3e3e3;
color: #333333;
}
td {
padding: 4px 6px;
}
</style>
</head>
<body padding="0.5in 0.5in 0.5in 0.5in" size="Letter">
<#if results?size != 0><#list results as result>
<table border="1" cellpadding="1" cellspacing="1" style="width: 500px;"><tr>
<td><b>Serial number</b></td>
<td><b>Display name</b></td>
</tr>
<tr><#if result.serialnumber?length != 0>
<td><barcode codetype="code128" showtext="true" value="${result.serialnumber}"/></td></#if>
<td>${result.displayname?string}</td>
</tr>
</table></#list></#if>
</body>
</pdf>
- Click Save.
- Navigate to Lists > Search > Saved Searches > Run the Saved Search created above.
- Click on Print Icon > Select the Advanced PDF/HTML Template created above.
- Click on Print.
**Notes:
- The above Advanced PDF/HTML Template is a sample template. A user may customize the template as he wishes.
- There is an Enhancement filed for this limitation. It is currently being tracked under 345568 Advanced PDF/HTML Templates > Custom Item Label PDF/HTML Template > Ability to print Standard/Custom Item Fields on Item Label Template