Jump to content

Drop-Down List Question


Kadin2048
 Share

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

Recommended Posts

Hello,

My apologies in advance if this is not the correct forum to post this question in. I'm fairly new to FMP, although I have quite a bit of experience with databases generally.

The issue I'm having is in trying to create a drop-down list that contains values from one set of fields, while actually storing something related to those fields.

Here's the situation: I'm making a database to keep track of appointments for a medical professional. I have one table ("Client_info") that has reference data on the patients, including First_name, Last_name, etc. It also has an automatically generated, unique number called Client_ID, which is the primary key for all tables. A second table ("Treatment") is supposed to store information on particular appointments/treatments. It has a Client_ID field (related 1:1 to Client_Info:Client_ID), Date, Type, etc.

What I want to have is on the view for entering Treatments is a drop-down list where the user can select a patient's name (First and Last name) from a drop-down list that's populated by the data in the Client_info table. But I don't want the name actually stored on the Treatment table, instead I just want to store the Client_ID number that's associated with that first and last name.

So basically, I want to have a menu that shows actual people's names, but when you choose a name, causes the Client_ID for that person to be saved. I don't want to actually show, or force the user to enter, the numeric client ID.

I haven't figured out a way to do this. FMP only seems to allow two fields to be used as part of a drop down list, and the name is two fields (first and last), and I need it to display both names but then also have (hidden from view) the ID number, and store that in the table. Before I really started messing around with calculated fields or lookups, I feel like there has to be an easy way to do it, but I can't figure it out and I haven't had any luck searching online or reading the manual.

Also ... if anyone wants to recommend a good book to read about how to use Filemaker, I'm in the market for one. I don't need a lot of background on data structure, but the nuts and bolts of doing stuff like this would be helpful.

Link to comment
Share on other sites

Correct, FileMaker only allows two fields to be used in value lists, so your first field (the one you want to actually store) would be the ID field, and your second field will be a calculated field:

First_name & " " & Last_name

Check the "Show values only from second field" checkbox and you're all done.

Link to comment
Share on other sites

  • 3 weeks later...

This topic is 5634 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.