8 Replies Latest reply on Jan 7, 2014 11:36 AM by philmodjunk

    Relationship issue

    bruns

      Title

      Relationship issue

      Post

           I cannot seem to figure out the relationship I need to make this work.  I have a portal "vessel assignments" and I have a field on the portal (or I want to put a field on the portal called"job number".

           I made a table for jobs because I want to capture more info about jobs and I of course have a vessel assignments table.  I have tried ever variation I can think of but I cannot get the job number field in the portal to show up, cannot even click in it.  Any help is appreciated, I am uploading a couple of screen shots.

      Capture1.PNG

        • 1. Re: Relationship issue
          bruns
          /files/e6bfdafb9d/Capture2.PNG 803x593
          • 2. Re: Relationship issue
            philmodjunk

                 Is the layout shown based on Employee? And you are assigning employees to specific vessels for specific periods of time?

                 Does a single record in Jobs describe what an employee will do during a single assignment to a vessel?

            • 3. Re: Relationship issue
              bruns

                   Yes the layout shown is based on Employee Table

                   Yes employees are assigned to specific vessels for a specific period of time, could be a different vessel next time

                   I would like to get to the point that I will have a portal of employees on the jobs layout for employees working that job

              • 4. Re: Relationship issue
                philmodjunk

                     Please explain what you mean by:

                     

                          I would like to get to the point that I will have a portal of employees on the jobs layout for employees working that job

                     Your screen shot shows fields for employee id, Date_Start, Date_End--which suggest to me that each record in Jobs represents the work done by a single employee on a specific Vessel. But this last statement would appear to indicate differently.

                     What does a given record in Jobs represent?

                • 5. Re: Relationship issue
                  bruns

                       Sorry my fault

                       Date start and date end are in reference to start date and end date of the job itself.

                        

                       I add fk_id_employee because I thought I would need that relationship

                       Jobs represents a job number with location, area of work and like I mentioned I would eventually like to put a portal on the jobs to record all employees that worked that job.

                        

                       That is why I was putting the job number on vessel assignments

                        

                       Am I going down the wrong path?

                  • 6. Re: Relationship issue
                    philmodjunk

                         So you can assign multiple employees to the same Job record?

                         If so, you just need to link Vessel Assignments to Jobs by pk_id_jobs. by a matching fk field in Vessel Assignments.

                         Format the fk field with a drop down list with pk_id_jobs in field 1 and job name in field 2 and you can select a job in the drop down list to link a given assignment record to that Job record. Once you've done that, any fields from Jobs that you place in the portal row will show data for that selected Job.

                         Note: this assumes that Job _Name is unique for each record. A more sophisticated selection method for choosing a job may be needed--especially if you have a lot of jobs to choose from in your value list.

                    • 7. Re: Relationship issue
                      bruns

                           Yes there will be lots of jobs to choose from in a value list, do you have a better solution for me  on this?  Thanks 

                      • 8. Re: Relationship issue
                        philmodjunk

                             The basic solution that I just outlined is what you want to start with. The "more sophisticated methods" are simply more complex but more user friendly ways to use to get that Job ID field into the mach field in the Vessel Assignments table.

                             So I'd start with the drop down list first to make sure that I had everything working.

                             Then I'd consider methods such as those demonstrated in these demo files as options for making it easier to select the correct Job for a given assignment record:

                             A drop down list that can auto-complete but which still links records by ID:

                             FileMaker 12 users: https://dl.dropbox.com/u/78737945/SimpleNameLookupDemo.fmp12
                             Pre FileMaker 12 Users: https://dl.dropbox.com/u/78737945/SimpleNameLookupDemo.fp7

                             Filtered "Selection Portals" that update automatically as you type in more and more text:

                        https://www.dropbox.com/s/0pm1gdqcfi2ndpv/EnhancedValueSelection.fp7

                             FileMaker 12 and newer users can open this last file from the File menu to get a copy converted to the newer .fmp12 file format.