Announcement

Collapse
No announcement yet.

Display Relationship Data Into Table

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Display Relationship Data Into Table

    Good Afternoon Peeps!

    I'm trying to built a template with a custom entity.

    I have 2 entities.
    Budget Group budget2 One-to-Many budgets1 Budget Item
    I'm building the template in budget groups and would like to show the budget items on a template within budget group.

    I haven't found out how to display into a table tho like the invoice shows items. Below is the invoice html. I see the itemList here but I don't have a list field in my entity. Anyone been down this road before?

    <p><br></p>

    <table border="0.5pt" cellpadding="2" class="table table-bordered">
    <tbody>
    <tr>
    <th width="5%" align="left">#</th>
    <th width="37%" align="left">Name</th>
    <th width="8%" align="left">Qty</th>
    <th width="16%" align="left">List Price</th>
    <th width="16%" align="left">Unit Price</th>
    <th width="16%">Amount</th>
    </tr>
    <!-- {{#each itemList}} --> <tr>
    <td>{{order}}</td>
    <td>{{name}}</td>
    <td>{{quantity}}</td>
    <td align="right">{{listPrice}}</td>
    <td align="right">{{unitPrice}}</td>
    <td align="right">{{amount}}</td>
    </tr>
    <!-- {{#if description}} -->
    <tr><td colspan="7">{{{description}}}</td></tr>
    <!-- {{/if}} -->
    <!-- {{/each}} --> <tr>
    <td colspan="7"></td>
    </tr>
    <tr></tr></tbody></table>


  • #2
    Hi dodom2 ,

    Based on the links definition you introduced on the post you have to use budgets1 instead of itemList as the following:

    <!-- {{#each budgets1}} --> <tr>
    CEO of Eblasoft
    EspoCRM Expert since 2014
    Full Stack Web Developer since 2008
    Creator of Numerous Successful Extensions & Projects​

    Comment

    Working...
    X