6 Replies Latest reply on Feb 22, 2012 12:01 PM by jrobgk1

    Employee Referral question...

    jrobgk1

      Title

      Employee Referral question...

      Post

      Greetings: the following question referst to FM 11.0.3
      I have a table called Model Records of employee records (each with a unique ID). I would like set up a relationship that would allow one of the models to be credited for "recruiting" other models to the company.  I want to track the new models name (from the same table, Model Records), whether she stayed as a prospect or went to active (which is the field Model Records::Work Status) and the date of the referral.

      My thought was to create a new table, called Referrals with:

      Referral ID
      Model ID --->related to Model ID in the Model Records table
      Model First Name
      Model Last Name
      Referral Date
      Referring Model ID

      when i create a portal in the original model records table to point back to Referrals, FM gives me an error.  

      Thoughts?  Did i miss something in the relationship? 

      Jesse

        • 1. Re: Employee Referral question...
          philmodjunk

          You're adding more fields than you need.

          You only need:

          Referral ID
          Referred Model ID --->related to Model ID in the Model Records table
          Referral Date
          Referring Model ID--->also related to Model records table by Model ID

          You's set it up like this:

          ModelRecords----<Referrals>---ReferredModelRecords

          ModelRecords::Model ID = Referrals::Referring Model ID
          ReferredModelRecords::Model ID = Referrals::Referred Model ID

          ReferredModelRecords would be a second "occurrence" of the Model Records table created by selecting Model Records in Manage | Database | Relationships and clicking the duplicate button (Two green plus signs).

          A portal to Referrals can be placed on on the ModelRecords layout with name and status fields from ReferredModelRecords included to list all models referred by the current model as well as their current status.

          • 2. Re: Employee Referral question...
            jrobgk1

            Phil-

            Great!  so the last piece of this is I want to show on the referred model's record who it was that referred her (referred by:).

            Do I need another mini portal to show  who it was that referred her?

            example Shannon referred Erin

            Erin's record has portal with referring model ID (shannon's) and name field (shannon)

            Jesse

            • 3. Re: Employee Referral question...
              philmodjunk

              The only reason you'd need a portal is if it is ever possible for a model to be referred to you by more than one other model. You would need to add more occurrences of Referrals and ModelRecords and then you could add the "referred by" info to the ModelRecords layout.

              ModelRecords----<ReferredByReferrals>--ReferringModelRecords

              ModelRecords::Model ID = ReferredByReferrals::Referred ModelID
              ReferringModelRecords::Model ID = ReferredByReferrals::Referring Model ID

              Now you can add fields from ReferringModelRecords directly to the layout if only one referring model is permitted. If more than one are possible, use a portal to ReferredByReferrals.

              • 4. Re: Employee Referral question...
                jrobgk1

                brilliant!  i now have the referred by and referring models fields all set up. If i want to jump from a portal row to that model's record (in the same table and using the same layout) would i need to script the navigation or is there an easier way to hop through?

                • 5. Re: Employee Referral question...
                  philmodjunk

                  It can be a one line script if you use Go to Related Records. GTRR will bring up all records in the portal, but thee portal row clicked will be the current record.

                  • 6. Re: Employee Referral question...
                    jrobgk1

                    Never mind! I sorted it out.  you use go to related record, choosing to match related record...awesome!

                    JR