December 14, 200520 yr 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
December 14, 200520 yr Author 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, 200520 yr by Guest
December 14, 200520 yr 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, 200520 yr by Guest Forgot the file
December 14, 200520 yr Author Fantastic thank you very much. Will down load the sample and have a look.
Create an account or sign in to comment