Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Best method of working/displaying foreign keys & their descriptions


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

Recommended Posts

Posted

I have been out FMP development for a little while so I am a little rusty. I am putting together a project tracking database. I have a main database, ProjectRequest, that has several fields that are integers that are codes to other tables. These codes are foreign keys in my ProjectRequest table. The actual description or name for these codes reside in the code table itself.

Example:

ProjectRequest has the following fields:

PriorityCode

StatusCode

PriorityCode table has:

PriorityCode

PriorityName

My problem is how to best display these fields on a layout. The code needs to be entered into the projectrequest:PriorityCode field but the user doesn't necessarily need to see the code field. They really only need to see the name field. I tried creating the code field & putting it behind the name field. I then set the tab order to catch the code field & not the name field. So if they tab into the code field, the display list comes up for them to select the code & then the name is displayed on the layout. It works but it doesn't allow users to click into the field & select the value because the code field is behind the name field. Do you see my issue? I can't remember how to best work with this.

I would greatly appreciate any suggestions you may have. Please let me know as well if I have not explained myself good enough & you need more info.

Thanks!

John

Posted

Hi John:

If users do not need to enter into the "name field," you can set the Field Behavior (a feature introduced in FM7 and available under the Format menu) for the "name field" so that users cannot enter the field in Browse or Find Modes. So long as the "code field" can be entered, users can click "through" the name field and into the code field.

Make sense? Is this workable, or are there other aspects we have to consider? Hope this solves the dilemma.

Posted

THat is workable & actually one method that I have right now. I was thinking there might be a way of not having the code field show up at all on the layout. Only the name field would show up but I may only be wishing in this aspect.

Thanks,

John

Posted

You can have the code field display the name only - if the value list is defined to show only the second field AND the field is formatted as a pop-up menu.

Posted

Comment, you are correct about the value list only showing the name but as soon as you select a value from the list, the code is entered into the code field.

I am starting to think what I am trying to do is not possible. :)

THanks,

John

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