AnsweredAssumed Answered

*main* e-mail field

Question asked by jekins on Dec 19, 2015
Latest reply on Dec 21, 2015 by Mike_Mitchell

Hey folks-


I'm new to FM and am trying to figure out how to make a calculated field in which it gets certain data from another table.


Specifically, I have a People table with a "Main Email" field.  I want this to be a stored, calculated field that looks at the Emails table (which consists of a "Person ID" foreign key, "Email", and "Is Main?" field.  I want the calculated field to take from the Email table the email address associated with the person which is marked "Is Main" (number using 1 like boolean).


If it were SQL I'd use a query like:
SELECT Emails.Email

FROM Emails

WHERE 'Emails.Person ID' = 'People.Person ID'


But I have no idea how to get values from other tables using FM calculations.


Thanks for help,