8 Replies Latest reply on Feb 24, 2010 4:42 PM by carolynhaywood

    trouble finding in a portal

    carolynhaywood

      Title

      trouble finding in a portal

      Post

      I have a Table (Client) related to a table (Job Information).  Within the table Client, I have a billable time tab with a portal for adding billable time (from a table Billable Time) to a job.  The job is in a portal window as well.  Most clients have more than one job.  When I try to find a job on the job portal, all jobs related to that client will come up and all records will be added to the first job in the list.  How can I have just ONE job that I can add time to?  I have this same set up across all my other tabs (expenses, labs, etc) so I really need to figure out a solution!

       

      Please help if you can.

       

      Thanks

      Carolyn Haywood 

        • 1. Re: trouble finding in a portal
          ninja
            

          Howdy Carolyn,

           

          Not knowing your structure (but assuming it), i figure you're seeing what I see in some of my Dbases.  It's a matter of perspective...literally.

           

          Looking at your Job table through a portal works well.  But when you do a find for it, you are looking from the perspective of the Client table.  When you do your find, you find all of the CLIENT records that have that JOB in the portal.  Now when you look at your portal, you see all of the jobs for that Client...not just the job you went looking for.  It's the perspective of the Client table that is getting in your way.

           

          If you do your find instead from a layout based on the JOB table...you'll only find the job you went looking for.

          What the best UI is for what you're trying to do is up to you...but find a way to have your layout based on the JOB table when you do that search...and then you'll get what you want.

           

          Note: For UI, explore how you could recreate most of the appearance of your layout if the layout was based on JOBS and have your search function (script) switch to that layout when you do this action.

           

          Again, it's the fact that you are searching a related table from the perspective of the parent that is causing you the headache.  See if you can change perspective without undue grief or work.

          • 2. Re: trouble finding in a portal
            philmodjunk
              

            Even though you are entering search criteria in a portal, you are actually searching your clients table for matching records. When you enter search criteria in your "billable time" portal, you are telling filemaker "Find all the records where a client has at least one related record in billable time with this criteria." It then finds these client records and you see all the related data in the portals not just the ones matching your find criteria.

             

            If you want to limit the results to just a specific Job, you'll need to use a different approach. You could set up a "Filtered Portal" so that after you've performed your find, the only records in your portal are those that match the criteria you use. This can be easy or hard to do depending on the criteria you need to specify. You can use the Advanced search link above to search for threads that refer to a "Filtered Portal" to see a number of examples of this technique.

            • 3. Re: trouble finding in a portal
              carolynhaywood
                 Thanks for helping.  I could not figure our filtering the portal so I decided to change the layout to one based on JOBS.  My problem now is that I can't view through a portal to give me client info related to the job.  I set up the portal with the two fields that I want but it shows nothing.  When I do a search, it comes up empty!  ADD to that - a button that won't show on a different portal.  It shows up on the layout just fine but in browse mode there is nothing.  If I move the cursor to where it should be, the pointing finger appears but does nothing.  I think I'm on brain overload.
              • 4. Re: trouble finding in a portal
                carolynhaywood
                   I finally got the button to work but the client portal still eludes me.
                • 5. Re: trouble finding in a portal
                  philmodjunk
                     We'd need more information about your database setup--particularly the relationship on which you've setup your portal--in order to suggest much more than we already have.
                  • 6. Re: trouble finding in a portal
                    carolynhaywood
                      

                    I have a table on the left known as Client, which contains the client information.  It is related to table Client Job Information by kp client id and kf job id.  I created a Jobs table which is related to table Client Job Information by job id.  On the Job layout, I have a portal for job information which is working (sorta) and a portal for client information (the id and the name).  The portal for client info shows one record but when I do a find on it, it comes up empty.  I don't know why this sole record is showing.

                     

                    What I'm trying to do is simple (or so I thought) - create a new job based on the client id so that I have a unique job number related to a client ID.

                    • 7. Re: trouble finding in a portal
                      philmodjunk
                        

                      "What I'm trying to do is simple (or so I thought) - create a new job based on the client id so that I have a unique job number related to a client ID."

                      Won't it be possible for one client to have more than one job? If so, you can't use the client id as the job number. Instead you should have a separate ID number in the Job information table.

                       

                      The relationship:

                       

                      Client::ClientID = ClientJobInformation::ClientID

                       

                      THen points to all jobs linked to a given client record--which could be more than one job information record.

                       

                      You can then use a Job ID field defined in Client Job Information to uniquely identify each individual job.

                       

                      That make sense?

                      • 8. Re: trouble finding in a portal
                        carolynhaywood
                           Yes!  Thank you so much.