When setting up an advanced HTML/PDF transaction f...
# beginners
g
When setting up an advanced HTML/PDF transaction form for Estimates, are the only Item fields that I can pull in, the column fields that are currently listed on the Estimate form? Or is there a way to pull in additional information, such as, the item image or a different display name field found on the item page? I am using the following syntax to call the record.item details but need to pull in additional info not currently listed on the Estimate form:
Copy code
<table class="itemtable" style="margin-top:10px;width:100%;"><!-- start items --><#list record.item as item><#if item_index==0>
<thead>
	<tr>
	<th align="center" colspan="3">${item.quantity@label}</th>
	<th colspan="12" style="width: 248px;">${item.item@label}</th>
	<th style="width: 97px;">&nbsp;</th>
	<th colspan="1" style="width: 92px;">${item.istaxable@label}</th>
	<th align="right" colspan="4" style="width: 58px;">${item.rate@label}</th>
	<th align="right" colspan="6">${item.amount@label}</th>
	</tr>
</thead>
</#if><tr>
	<td align="center" colspan="3" line-height="150%">${item.quantity}</td>
	<td colspan="12" style="width: 248px;"><span class="itemname">${item.item}</span><br />${item.description}</td>
	<td style="width: 97px;"><#if itemurl?has_content><img src="${itemurl}" style="width:100px;height:100px;background-color:#999;" /> <#else>
	<div style="width:100px;height:100px;background-color:#999;">&nbsp;</div>
	</#if><br /><span class="itemname">${item.upccode}</span><br />&nbsp;</td>
	<td colspan="1" style="width: 92px;">${item.istaxable}</td>
	<td align="right" colspan="4" style="width: 58px;">${item.rate}</td>
	<td align="right" colspan="6">${item.amount}</td>
	</tr>
	</#list><!-- end items --></table>
d
You'll need to make a custom transaction line field that sources the image url from the item record. Field doesn't need to 'store value', and I believe also doesn't need to be visible ("show") on your Estimate form The you reference like other custom line fields:
<#list record.item as item><img src="${item.custcol_myurlfield}" /><#list>
there's also this
@filecabinet
element you can use, but haven't looked into it:
<@filecabinet nstype="image" src="URL for image"/>
g
Thank you for the reply. I was able to use the custom transaction line fields to pull in all of the data I need except for the product image. I did find the scripts that are currently being used to generate the PDF label when clicking on the Print 19x19 button. This is the code being used to generate that image URL:
Copy code
var imageid = rec.getValue({fieldId:'custitem81'});
                
                if(!isEmpty(imageid)){
                	var lookup = search.lookupFields({type:'file',id:imageid,columns:['url']});
                	var imageurl = lookup.url
                		
                	if(!isEmpty(imageurl))
                		imageurl = imageurl.split('&').join('&');
                		customData.itemurl = imageurl;
                }
Is there a way for me to do something similar within the Advanced HTML/PDF Forms environment using Freemarker syntax? I am at a loss as to what I can call to pull the image URL. The custom label that points to the image, <custitem81>30012</custitem81>, stores the file number. Inside the file details screen, I can see the various URLs generated but I just don't know how to pass that data back to the estimate record. I don't see any of that when trying to source that data to a custom transaction line field. Any help with this is greatly appreciated. Thanks in advance.