Jump to content

Populating foriegn key field using lookup table


consultgal
 Share

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

Recommended Posts

I have been out of FM development for a few years and now that I'm back, I seem to have forgotten some very basic things. (I guess that happens when you switch to MySQL and PHP for awhile!)

Should I use a global text field to allow a user to select the row from the lookup table? I only want to store the foriegn key in the master table.

Link to comment
Share on other sites

I'm sorry I should have been more clear. I recognize the difference between field types. I guess what I am asking is why would I ever want to store the field that the person used to lookup?

For example, I want to associate a doctor with a study, so i am going to store the PersonID for the doctor as a foriegn key in the study table. Onviously, my user will need to look the doctor up by name, as they don't know the key value. But I don't want to hardcode the name in the study. I want it to change if the doc's name changes (i.e. they get married). So it seems to me in that situation I would want to have the lookup of the doctor's name be done through a global, yes?

Thanks in advance!

Courtney

Link to comment
Share on other sites

This topic is 5651 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
 Share

×
×
  • Create New...

Important Information

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