7 Replies Latest reply on Dec 9, 2011 7:09 AM by FM_Rookie

    Make your spouse linkable to their profile

    ScottWright

      Title

      Make your spouse linkable to their profile

      Post

      I have a contacts management database running and I have a question.

      I would like to add a spouse field on the page, but would like to click on the spouse to goto their profile or contact details.  Is that possible?

      I would want to maybe browse the cm db for the spouse to fill into that field.

      Example:

      Doe, John, fill in the address and all that good stuff

      Spouse: [click here] to search for the spouse and it would bring up the index where you can select the spouse.

      Index

      Applebe, Sara

      Doe, John

      Doe, Zoie

      Smith, Tom

      Zoie Doe can be selected to fill the Spouse field, but if I am in John Doe's profile but I want to go to Zoie Doe's profile, I could click an icon next to the field and would automatically go to her profile

        • 1. Re: Make your spouse linkable to their profile
          symbister

          Hi Scott

          not sure if this is what you want, but I've done something similar in a db I've setup - it relies upon a second TO of the main table, with the link firstname=partner_firstname and lastname=partner_lastname, so that if the partner is also a constituent in the db, a button will appear in the principal contact record to display the partner details

          'Partners' is set up as another TO of 'picacontax', then a button 'Click here for partner details' runs a tiny script opening a small window with the partner details..

          I was hoping to include a screenshot, but that only appears to work if I initiate a post.

          anybody any idea how i can upload a screenshot from my desktop, using Safari on mac (Insert/Edit IMage button in Post toolbar prompts for an URL) ?

          • 2. Re: Make your spouse linkable to their profile
            philmodjunk

            Upload your screen shot to a file sharing site and then post a link to it here.

            Rather than link by name (not all spouses have the same last name and other contacts who are not spouses may have the same last name), link a spouse's Contact record by the spouse's contact ID number. Add a SpouseID field to your table for that purpose.

            Every contact record in your table should already have a contactID field set up to auto-enter a serial number. If you don't have one, you should add it to your table and use Replace Field Contents to give all your existing contact records a unique serial number.

            Now you can set up this relationship:

            Contacts::SpouseID = Spouses::ContactID

            Spouses would be a new table occurrence of Contacts that you create by selecting Contacts in Manage | Database | Relationships and then clicking the button with two green plus signs. You can double click the new occurrence to bring up a dialog box where you can rename it.

            Then you can format SpouseID on your layout with a pop-up menu or drop down list of ContactID's that also displays contact names. You can add name fields from Spouses to display the spouse name once their ID is selected in the SpouseID field. A button next to it can use Go To Related Records to either jump you to their contact record, or bring it up in a floating window.

            • 3. Re: Make your spouse linkable to their profile
              symbister

              Thanks Phil....http://www.4shared.com/photo/f5WlwQPB/Picture_1.html

              meanwhile good point about other contacts with same last name - with a small db it's not such an issue (we have some 8000 records so far) but as it grows I'd like to future-proof it, so I'll have to rejig what I'm doing.

              screenshot is portion of principal record data entry layout, with salutation concatenating either Joe Bloggs; Joe and Sue Bloggs; or Joe Bloggs and Sue Smith, depending on Select Salutation, then button 'Click Here...' brings up sub-window. Relationship shown but due for revamp once I have some time 

              cheers!

              • 4. Re: Make your spouse linkable to their profile
                FM_Rookie

                I have another question related to this...

                How do you also automatically have the Spouse you just connected to the Contact also be connected with the Contact (as their Spouse) when you are viewing the Spouses profile as Contact? (I'm sorry if that's confusing)  I don't want to have to go to the Spouse & do the same for them.

                Thanks!

                • 5. Re: Make your spouse linkable to their profile
                  mgores

                  If you have the contactID for each contact, then added a spouseID field to your contact table, you could relate a second TO of contacts called "Spouse"

                  Contacts::contactID = Spouses::SpouseID

                  Then set up a script so when you click the button to put Zoie"s ID in John's spouseID field, it also puts John's ID in Zoie's spouseID field.

                  Or you could set something like this up to trigger "On Modify" for the spouse ID field.

                  Freeze Window

                  Set Variable $contact = contacts::contactID

                  Set Variable $spouse = contacts::spouseID

                  perform find (contacts::contactID = $spouse)

                  Set Field spouseID; $contact

                  perform find (contacts::contactID = $contactID)

                  Show All Records

                  Refresh window

                  • 6. Re: Make your spouse linkable to their profile
                    philmodjunk

                    This is an old thread. After about 3 months, new posts to a thread in this form no longer cause the topic to appear in Recent Items. In such cases it's very eay to miss them. I only noticed this one because I was reviewing topics in search of one I had just responded to. In these cases, you can start a new thread and paste a link to the older thread in your post if you need that info to establish the context behind your question.

                    Note: another option that allows you to link more than just two individuals to the same contact record is to use a join table--which then permits linking any number of people to the same contact record (all memembers of one family and living at the same residence, all employees of the same company....)

                    • 7. Re: Make your spouse linkable to their profile
                      FM_Rookie

                      As suggested by PhilModJunk, this post continued at:  Make your spouse linkable to their profile:  Part 2