Jump to content

Complete Brain Fade


rick fry

This topic is 6679 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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

Link to comment
Share on other sites

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 by Guest
Link to comment
Share on other sites

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 by Guest
Forgot the file
Link to comment
Share on other sites

This topic is 6679 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.