Hi,
How to add an attribute to the tr element with the value taken from a certain field in the detail table?
Example:
Design mode:
<tr id="Transactions" data-repeat="">
<td class="data Transaction Date">@T2@</td>
<td class="data Description">@D3@</td>
<td class="data LCY">@C7@</td>
<td class="data Total_Used_Amount">@L5@</td>
<td class="data Category_Name">@T6@</td>
</tr>
required output (source view):
<tr id="Transactions" data-repeat="" class="Travel">
<td class="data Transaction Date">17/12/2017</td>
<td class="data Description">Expedia</td>
<td class="data LCY">850.00</td>
<td class="data Total_Used_Amount">1270.00</td>
<td class="data Category_Name">Travel</td>
</tr>
<tr id="Transactions" data-repeat="" class="Food">
<td class="data Transaction Date">17/12/2017</td>
<td class="data Description">Carrefour</td>
<td class="data LCY">50.00</td>
<td class="data Total_Used_Amount">1320.00</td>
<td class="data Category_Name">Food</td>
</tr>
I tried the following script but it uses the same value of Category_Name (first transaction) for all the transactions:
var f = record.tables.detail[0];
results.attr(‘class’,f.fields[‘Category_Name’]);
Thanks,
farid