durian Posted April 3, 2007 Posted April 3, 2007 I've looked around a bit and not found what I'm looking for, so here goes... For each Contact record I can have several phone numbers. The Phones are in their own related table and shown in a portal window on the Contact layout. What I want to do is allow one and only one of the Phone numbers for each Contact to be marked as "Main", thus making it unique in that portal for that Contact record. If I were doing this in MySQL I'd index the combination of "Main" and "ID", making the combination unique, but I don't see how to do this in FMP. I tried working it by creating a new field that combined those two fields, but I can't make a calculation unique (or can't see how to). Any suggestions, solutions, ideas? Thanks, Nelson
mr_vodka Posted April 3, 2007 Posted April 3, 2007 Why not store the primary key for the related phone record in a field in the contact record. You can then have a TO from Contact::fkMainPhoneID to pkPhoneID. On the portal itself where it displays all the related phone numbers for the contact, you can have the row a button where it basically sets the Contact::fkMainPhoneID field with current portal row record's PhoneID.
durian Posted April 5, 2007 Author Posted April 5, 2007 John and Comment, That was it exactly. Comment, the example you pointed to worked perfectly to accomplish what I was after. Thanks
Recommended Posts
This topic is 6442 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 accountSign in
Already have an account? Sign in here.
Sign In Now