dbTalk Databases Forums  

FM 11 - Emailing lists

comp.databases.filemaker comp.databases.filemaker


Discuss FM 11 - Emailing lists in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Doug Anderson
 
Posts: n/a

Default FM 11 - Emailing lists - 10-12-2011 , 03:48 PM






I have a database with two tables.

Table one consists of just one field, its an email address. There are
no duplicate email addresses, each is unique.

In the second table I have two fields, one is email address which is
linked to table 1 and the second is a customer name.

In layouts I can create a portal that shows for each email address all
the customer names.

What I want to do is carry that over to the Send Mail function; but
I've been unable to figure that piece out. How do I insert a
Calculation that will pull each record from table 2 where the email
address matches and in the body of the email list the values in list
form from the customer names field?

Reply With Quote
  #2  
Old   
Your Name
 
Posts: n/a

Default Re: FM 11 - Emailing lists - 10-14-2011 , 06:28 PM






In article <2011101215485852723-douga@fcstonecom>, Doug Anderson
<douga (AT) fcstone (DOT) com> wrote:

Quote:
I have a database with two tables.

Table one consists of just one field, its an email address. There are
no duplicate email addresses, each is unique.

In the second table I have two fields, one is email address which is
linked to table 1 and the second is a customer name.

In layouts I can create a portal that shows for each email address all
the customer names.

What I want to do is carry that over to the Send Mail function; but
I've been unable to figure that piece out. How do I insert a
Calculation that will pull each record from table 2 where the email
address matches and in the body of the email list the values in list
form from the customer names field?
You already have a Relationship link from Emails -> Names, so you're half
way there.

Now you can create a new Calculation field in the Emails Table that
retrieves all the Names via that Relationship using the List function (it
depends on what version of FileMaker you're using as to what this function
is actually called).
e.g.
EmailNames Calculation, Text Result, Unstored
= List (Relationship::Name)

This will cause the EmailNames field to be given a copy of all the related
Names, separated by a carriage return character.

For example, if you had data like:

Email Table: Flinstones (AT) Bedrock (DOT) com
Rubbles (AT) Bedrock (DOT) com

Names Table: Flinstones (AT) Bedrock (DOT) com Fred
Flinstones (AT) Bedrock (DOT) com Wilma
Rubbles (AT) Bedrock (DOT) com Barney
Flinstones (AT) Bedrock (DOT) com Peebles
Rubbles (AT) Bedrock (DOT) com Betty
Rubbles (AT) Bedrock (DOT) com Bam-Bam
Flinstones (AT) Bedrock (DOT) com Dino

Then the new EmailNames field in the Email Table for the two records would
have this data:

Fred
Wilma
Peebles
Dino

and

Barney
Betty
Bam-Bam

The order of the Names will depend on the sorting of the Relationship.

This Field can then be used when emailing - you can of course replace the
carriage return character with commas or whatever else you want using the
Substitute function.

Helpful Harry )

Reply With Quote
  #3  
Old   
cortical
 
Posts: n/a

Default Re: FM 11 - Emailing lists - 10-14-2011 , 06:58 PM



On 13/10/11 7:18 AM, Doug Anderson wrote:
Quote:
I have a database with two tables.

Table one consists of just one field, its an email address. There are no
duplicate email addresses, each is unique.

In the second table I have two fields, one is email address which is
linked to table 1 and the second is a customer name.

In layouts I can create a portal that shows for each email address all
the customer names.

What I want to do is carry that over to the Send Mail function; but I've
been unable to figure that piece out. How do I insert a Calculation that
will pull each record from table 2 where the email address matches and
in the body of the email list the values in list form from the customer
names field?

t1 = Email
t2 = Customer


Names are NOT a sound way to implement keys; you need a customer_id in
each table.

So in Customers the primary key is customer_id; defined as an auto
enter, serial, unique, no modify ( the standard primary key definition)


I Emails, the pk is email_id, also defimed as a as an auto enter,
serial, unique, no modify ( the standard primary key definition).
Also in Email table, a customer_id 'foreign key', text field


So a REL from Email to Customer will use customer_id to customer_id


Use the List function: List( Customers::name) to calculate teh list of
related names, for a given email record

Reply With Quote
  #4  
Old   
Doug Anderson
 
Posts: n/a

Default Re: FM 11 - Emailing lists - 10-20-2011 , 04:49 PM



On 2011-10-14 23:28:24 +0000, Your Name said:

Quote:
In article <2011101215485852723-douga@fcstonecom>, Doug Anderson
douga (AT) fcstone (DOT) com> wrote:

I have a database with two tables.

Table one consists of just one field, its an email address. There are
no duplicate email addresses, each is unique.

In the second table I have two fields, one is email address which is
linked to table 1 and the second is a customer name.

In layouts I can create a portal that shows for each email address all
the customer names.

What I want to do is carry that over to the Send Mail function; but
I've been unable to figure that piece out. How do I insert a
Calculation that will pull each record from table 2 where the email
address matches and in the body of the email list the values in list
form from the customer names field?

You already have a Relationship link from Emails -> Names, so you're half
way there.

Now you can create a new Calculation field in the Emails Table that
retrieves all the Names via that Relationship using the List function (it
depends on what version of FileMaker you're using as to what this function
is actually called).
e.g.
EmailNames Calculation, Text Result, Unstored
= List (Relationship::Name)

This will cause the EmailNames field to be given a copy of all the related
Names, separated by a carriage return character.

For example, if you had data like:

Email Table: Flinstones (AT) Bedrock (DOT) com
Rubbles (AT) Bedrock (DOT) com

Names Table: Flinstones (AT) Bedrock (DOT) com Fred
Flinstones (AT) Bedrock (DOT) com Wilma
Rubbles (AT) Bedrock (DOT) com Barney
Flinstones (AT) Bedrock (DOT) com Peebles
Rubbles (AT) Bedrock (DOT) com Betty
Rubbles (AT) Bedrock (DOT) com Bam-Bam
Flinstones (AT) Bedrock (DOT) com Dino

Then the new EmailNames field in the Email Table for the two records would
have this data:

Fred
Wilma
Peebles
Dino

and

Barney
Betty
Bam-Bam

The order of the Names will depend on the sorting of the Relationship.

This Field can then be used when emailing - you can of course replace the
carriage return character with commas or whatever else you want using the
Substitute function.

Helpful Harry )
Thank you for the help, that worked perfectly.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.