rick fry Posted December 14, 2005 Posted December 14, 2005 Sorry guys you are going to think this guy is dangerious with a computer let alon filemake. I have a list of clients which includes there e-mail address. I want to be able to create a separate table which will list all the emails i have sent to the clients. I have created 2 tables One called clients and one call messages. I have created a relationship based on the email address. I want to be able to select a client click on a button next to the email address which will create a new message record and populate the e-mail address field with the clients e-mail address. Many thanks in advance
rick fry Posted December 14, 2005 Author Posted December 14, 2005 (edited) The problem is i cant get the email address to appear in the email field on the messages screen. I have tried set field lookup get value. It should be so simple Edited December 14, 2005 by Guest
Genx Posted December 14, 2005 Posted December 14, 2005 your rar doesnt seem to work, attach the file unrared or try zipping it.
Fenton Posted December 14, 2005 Posted December 14, 2005 (edited) You have a misunderstanding of relationships. When you run New Record in the Messages table, there is no data in the record, hence there is no relationship to the Test (people) table. Since you are setting what is to be the "key" field, that is normal. Without the relationship being complete and committed the Messages table has no idea what the record in Test is, it has no access to it or its fields (except globally stored fields, which do not belong to any particular record, but to the table as a whole, and can be accessed even without a relationship; though they need a Table Occurrence). So you need to pass the email value from Test to Messages. There's a couple ways to do this. The old way would be to set a global field to the email value, before leaving Test. The global could be in either table. But in 7 there's a newer and better way for scripts that are button-driven (which should not be visible in the Scripts menu). That is to use a Script Parameter. This is an option at the bottom of the dialog when you attach a script to a button. In this case we add the email field. Then, in Messages you retrieve this value with the function Get ( ScriptParameter ). One thing to watch out for when using Script Parameters is to remember to add it again if you switch the button later (say use an icon instead), because it's attached to the button, not to the script being run. link_tables_fj.fp7.zip Edited December 14, 2005 by Guest Forgot the file
rick fry Posted December 14, 2005 Author Posted December 14, 2005 Fantastic thank you very much. Will down load the sample and have a look.
Recommended Posts
This topic is 6976 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now