Page 1 of 1

Primary and Secondary Phone Numbers

PostPosted: Tue May 08, 2007 4:01 pm
by Marvin
OK, here's an interesting challenge:
I have both Companies and Non-Company contacts in the database. I need to be able to show the fax number for those contacts where FlagIsCompany =1, otherwise I want to show a second phone number (such as Home or Cell).

Although I need it for the face sheet you helped me on earlier, I thought the idea might be useful for others as well.

I thought of having two check boxes one marked main and one marked second, and then the second number could be any phone (or even an e-mail).

The other option I considered was a calculation field that showed the Fax number if FlagIsCompany=1.

What would you do?

PostPosted: Wed May 09, 2007 7:04 am
by John Sindelar
I might not be understanding the goal completely, but you could create a new calc in Contacts to show this fax-or-phone-number and if the contact was not a company have it show the next phone number marked "main". The calc for that next main phone would be:

GetNthRecord ( ContactPhoneMain::PhoneNumber ; 2 )

Of course that shows the 2nd number according to the sort order of the ContactPhoneMain relationship, making it a bit hard to take a new phone number and make it main while an older number becomes second.

So if you need to refine that, you could a) change the sort of ContactPhoneMain so that it sorted on a value list for the field "Phone Type" where you could have a value like "backup" or "2nd" phone; or b) create a new checkbox field as you've suggested for "2nd" and make a new relationship for this "2nd" selection like the relationship ContactPhoneMain. This new relationship is, in my eyes, the most flexible arrangement.