AnsweredAssumed Answered

Create text for an Email using multiple records from related table

Question asked by fredrick on Apr 29, 2016
Latest reply on Apr 29, 2016 by fredrick



I'm in a bit of a situation here...


Not new to Filemaker but no expert either I am having an issue to create the text for my email in the correct way. Perhaps the solution is staring me in the face, I'm grateful for any help.


The issue is as follows.

I'm building a solution to help  sales.

One of the functions that I would like to include is to send quotes to customers.

Each quote can have multiple line items, and I have used a simple setup where there is a Quotes table and a Quote Line items table linked through the Quote ID (and further linked to the customer data, product data in their respective table, etc)


I would like to make an Email that says something like this:



Dear Mr XYZ,


Please find below our offer.


01. Chocolate Cookies

Amount: 3000 Boxes

Price per Box: USD 3,0

Shipment: August

Incoterm: CIF New York


02. Blueberry Muffins

Amount: 6000 Pcs

Price per piece: USD 0,5

Shipment: August

Incoterm: FCA Washington


We hope to have made you a good offer, (now buy our product. )


Kind regards,


Cookie Company.







I have thought about making a PDF file, but most people would find that a hassle, and difficult to use, answer to, etc.


Therefore I wanted to put this into the body of the email, but the way that I can do this is giving me issues.

I think that I basically need to loop through the related Quote Line items output the text and end loop after the last one insert the salutation and done.

BUT, I cannot execute a loop in a calculation, and the email body in the email script is a calculation.


Then I thought I can create a Global Field where I input the text from a script when I loop, but in a way I seem to be unable to get my head round a way to insert the text output into a global field...


Perhaps there is a completely different way to do this?


Is there anyone who would have an idea to help me?