Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Best method of working/displaying foreign keys & their descriptions

Featured Replies

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

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.

  • Author

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

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.

  • Author

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

I am missing the point here: what else should be entered into the code field, if not the code?

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.