AnsweredAssumed Answered

Using List function in body of Email

Question asked by KathleenBrown on Dec 9, 2016
Latest reply on Jan 20, 2019 by thiyagarajan

I was having difficulty getting the contents of a List function on a related table's calculated field to send in the body of an Email correctly.  Only the first related record's value were coming thru in the email body.  When I put the email body into a custom dialog to view it, it would display correctly, it was just not passing thru to the send email step correctly.  Using mac and windows clients and fmp 15 on a windows server.


What didn't work:

Using both the List function or a Set Variable to the List function in the email body.



using Set Field (to a global field) to the List function and then using that global field in the email body did work.


Is there any reason the first 2 methods wouldn't work properly?

Any explanations? I'm just trying to understand for future usage and post here in case someone else had the same problem.

more detail below:


I have an Orders table from which I'm sending an email.

In the Related Line Items table I have a text calculation field "Text_for_Email" building properly with several text fields appended to each other, e.g. where <p> is paragraph return

"Item # Qty Description <p>

Cost <p>

Total Amount"


Then in the Orders table email script I wanted to use the following in the body of the email.
List (Text_for_Email), e.g.:


"Item #relatedline1 Qty1 Description1 <p>

Cost1 <p>

Total Amount1<p>

Item #relatedline2 Qty2 Description2 <p>

Cost2 <p>

Total Amount2<p>

Item #relatedline3 Qty3 Description3 <p>

Cost3 <p>

Total Amount3"


But only the contents of the first Text for Email field were being sent to the email until I used the List function in a global field.


Thank you in advance, kathy