5 Replies Latest reply on Jan 11, 2013 3:39 PM by philmodjunk

    Obtain person's name associated with IDs

    RonaldCarr

      Title

      Obtain person's name associated with IDs

      Post

           I am creating a Job Bank application.
           I have a Referrals table that containds the ID of the JOB seeker and also the ID of the Employer who needs those skills.
           Job Seeker and Employer are in the same Contact table.

           On the Referral Layout, how do I display the names of each dreived from the separate ID's?

           Trying to recapture lost knowledge...the years go by.

        • 1. Re: Obtain person's name associated with IDs
          philmodjunk

               Enter layout mode.

               Use the field tool to add a new field object to your layout (drag and drop from the tool).

               In the specify fields dialog that pops up, select an occurrence of the Contact table from the drop down at the top of the dialog. (select one related to Referrals.)

               Select the Name field in the resulting list of names that appears from that table occurrence's data source table.

               That should add either the employer name or the Job seeker name depending on the occurrence selected in the drop down.

               Repeat the process, but select the other related contact table occurrence to add the other name.

          • 2. Re: Obtain person's name associated with IDs
            RonaldCarr

                 I see I was not entirely clear.

                 The Referral record records a referral of a Job Seeker to an Employer.

                 Both the Job Seeker and the Employer are in the same Contact table: on the Referral layout they will of course be two separate ID's on the same record.

                 Thus I want to generate two names on the layout view, one for each.

                 The primary key to the referral is a Referral ID.

                 Now maybe you are referring to a TOG that I have not considered?

                 Would that be one for Jobseekers and one for Contacts, even tho they are the same table?

            • 3. Re: Obtain person's name associated with IDs
              philmodjunk

                   I see I was not entirely clear.

                   I believe that you have these relationships: (but the field names may be different)

                   JobSeeker::ContactID = Referrals::SeekerID
                   Employer::ContactID = Referrals::EmployerID

                   Where JobSeeker and Employer are two different table occurrences of Contacts.

                   If that is correct, then you can drag a field tool on to a layout based on referrals and select "JobSeeker" from the drop down that I described earlier. This selects the JobSeeker table occurrence. Then click the ContactName field (Or whatever it is named in the Contacts data source table) to select the JobSeeker's name to be the source of data for your new field.

                   Repeat those steps, but select Employer instead of JobSeeker and you will be able to add the Employer's name to the layout as well.

              • 4. Re: Obtain person's name associated with IDs
                RonaldCarr

                     I think I see another approach I should have taken.

                     I will try that out tomorrow and get back to you.

                      

                • 5. Re: Obtain person's name associated with IDs
                  philmodjunk

                       You appear to have a many to many relationship. Here's a demo file you may find useful to examine: https://www.dropbox.com/s/oyir7cs0yxmbn6i/ManyToManywDemoWExtras.fp7