Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
linenumberstrue
<tr>
        <td>Requested by</td>
        <td><span style="font-family: 'Brush Script MT', cursive;" th:text="${createdByName}"></span></td> 
        <td colspan="2"></td>
</td>


Show values from order-line custom fields


To show the values from all custom fields of your purchase order line you can use the following code fragment (line 2):

Code Block
linenumberstrue
<td class="text-left" th:text="${orderline.product.description}"></td>
<td class="text-left" th:each="cfI,index : ${orderline.customFieldsDto}" th:text="${cfI.value}" th:class="${index.count % 2 > 0}? 'odd'"></td>


Our you can show individual fields, using this technique (lines 2 and 3):

Code Block
linenumberstrue
<td class="text-left" th:text="${orderline.product.description}"></td>
<td class="text-left" th:text="${orderline.customfield_1}"></td>
<td class="text-left" th:text="${orderline.customfield_3}"></td>


In the example above, we're outputting the values for GL code (customfield_1) and URL link (customfield_3)