Jump to content

Users have multiple phone numbers

Recommended Posts

I have a client layout which displays one client per page.  Each client has several phone numbers (home, work, mobile).  I created a separate table for phone numbers (one to many) connected by the clientID.  The phone table has ID, clientFK, type (mobile, home, work), and number.

I created a portal on the client page to display the various numbers for each client.  It works ok.

I then created a Client list.  Can I display a specific number from the phone list on the portal??

Thanks for any assistance.

Link to post
Share on other sites
10 hours ago, Greg58 said:

Can I display a specific number from the phone list

Which "specific" number do you want to display? Will it be the same type for all users? Or do you want to select the preferred number for each client? Or something else?


Link to post
Share on other sites

Here's part of a simple phone portal.  Checking the box marks that number as main and moves it to top of portal.

Also has auto formatting and error checking.Simple Phone.fmp12
You can do the same basic thing with emails.

Edited by Steve Martino
Link to post
Share on other sites
33 minutes ago, Steve Martino said:

Here's part of a simple phone portal.

Actually, it is not nearly as simple as it could be. It is not simple, because it is conceptually wrong:

If only one phone is allowed to be designated as "main", then the identity of the "main" phone is a property of the parent client - and should be recorded in a field of the Clients table. This eliminates the need to look for other phones previously selected as as "main" and remove such selection. The entire process can be reduced to just:

Set Field [ Clients::MainPhoneID ; Phones::PhoneID ]

and all that remains is to provide a visual indicator to mark the selected phone.


Link to post
Share on other sites

Interesting @commentI’m not disagreeing with you but I don’t quite understand 'conceptually wrong'.  Does it depend on what the user is actually doing with it?

IOW, if the only reason to have a number 'checked' is to designate it as the best number to reach that client, does it matter?

Or maybe a better question is what can you do with that field on the client table that can’t be done as my example shows.

just curious/trying to learn.



Edited by Steve Martino
Link to post
Share on other sites

Conceptually, the right question to ask is this: what does the selection of a number as "main" describe? Does it describe the number, or does it describe the client? I say that - contrary to intuition - it cannot describe the number, because it does not depend solely on the number. If user selects another number, then this number must be deselected. This violates the 3rd normal form, often expressed as: "Each attribute must represent a fact about the key, the whole key, and nothing but the key."

In other words, if there can be only one such selection, then it describes the "one" in a one-to-many relationship and belongs in that table.

That's on the conceptual level. You don't need the conceptual level to see that placing the selection in a field of the Clients table makes things much more simple. However, I wanted to point out that this is no coincidence: the unnecessary complication is caused by the conceptual mistake.


Edited by comment
Link to post
Share on other sites

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.