Help: Email Body Template

I have some hard time for what seems an easy task, but I cannot get to the solution even with support tutorials.

I would like to create an Email Body Template and this is the current result I reach:

My current Template:

Any guidance how I should modify my template to reach that ?

btw I was following this tutorial:

but the sample app related seems missing unfortunately.

Thanks in advance for your support.

The tutorial you followed is like a level 1 tutorial; you’re asking for the next level, if not the one above that.

In order to get grouping things like that to work, you have to wrap your mind around how to use [_thisrow-1] and the like.

What you need to do is create a singular list (in your order table) of each of the suppliers included inside that order.
Once you have that list, then you can create a <<START:>> inside your template to begin a cycle for each of the suppliers inside that list.

This is where the [_thisrow-1] stuff comes in…

Inside that <<START">>, you’ll then need to call back to the order to grab the list of items from the supplier that’s “currently being processed by the system” - aka, its inside that supplier.

You’ll end up with something like this:

  • Your order starts
    • You create a section <<START:>> taking you to the Supplier table
      • You create another <<START:>>, this one a table, to list off each of the appropriate records from the order (that match the current supplier)
      • You end the table
    • You end the Section
  • You end your order

I am aware that a simple listing of what you need to do to make this happen is… minimal instructions, at the least. But as you can tell, in order to get what you want to happen there is a LOT of stuff to get right - and any 1 tiny thing that’s off will break the whole thing (like all programming).


Thank you very much for your answer.

After some times, I managed to get to the result expected, without using “[_thisrow-1]” as I was not at ease with this Expression.

How I get to the solution: I added 1 column in the Suppliers table where a marker appear when an Order is associated to it. Then I wrote the ‘Email Body Template’ this way:

(the “Marker” I talked about above is the ‘Any Order’ column).

And here the result:

Hopefully it can be useful for someone else.


Nice one! partyparrot (Appsheet)