Netsuite Advanced PDF/HTML code ifelse statement

狂风中的少年 提交于 2019-12-04 05:32:47

问题


I need some assistance in the correct way to format this code for a item fulfillment in Netsuite;

  <td><#if item.units != null>Units<#else>${tranline.units}</#if></td>

I want the PDF form to show the Units of Measure (i.e. units) and if there is no particular UOM specificied for the item, to say UNITS instead of displaying nothing.


回答1:


Your example looks correct to me, aside from the values being in the wrong places. In my PDF templates, I do not use NULL, either. Below is how I have a similar item written.

<#if item.units=="">
  Units
<#else>
  ${tranline.units}
</#if>


来源:https://stackoverflow.com/questions/39991278/netsuite-advanced-pdf-html-code-ifelse-statement

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!