5 Replies Latest reply on Sep 27, 2012 3:05 PM by PaulWebb

    To find or not to find...

    PaulWebb

      I've been at this less than a year and I of course bit off more than I can chew but I plan to survie my decision.

       

      I'm building a solution for my team at work. There are about 100 or so of us and we support around 250+ customers. The solution tracks trouble tickets for a tech company. The users will not be creating any records as we will connect to another DB that houses everything. My users will review cases, make changes, and add notes. All of the tickets (cases) in the DB have a contract associated to them. Each contract then associates to a portfolio number and the users are assigned portfolio(s) to manage. I have my welcome screen setup so that the user has to select a portfolio to work with and sets a global variable.

       

      Now that they are logged in and I know who they are and what portfolio they need to work in I need all of the layouts to show only the records associated to that portfolio. Is it best to do a find everytime you go to a layout? I am currently using the navigate script from FTS Meetings. Basically you set a parameter with the layout name and it jumps to the correct layout. I then use a script trigger to find the correct records but that doesn't seem like the best route to have them refind everything especially if they are jumping back and forth between layouts.

       

      Just looking for the best option to show only related records to the portfolio. Sorry so long winded for what is probably a simple question.

       

      FM Pro 12 Advanced

        • 1. Re: To find or not to find...
          johnners

          Dear Pawebb

           

          I would replace the global variable that you set with a global field added to the portfolio table. In a multiuser environment globals fields have their own unique value per user. Make the value of the global field equal to the value of the primary key for the records that the user has been assigned. Now you can create a related table occurance to the records for that portfolio using the global field of the parent equal the primary key of the child. On your layout you can now show all the related records using a portal. The beauty of doing this over performing a find is tat the records will show dynamically as records are added to or removed from the portfolio.

           

          Regards

           

          Johnners

          • 2. Re: To find or not to find...
            DavidJondreau

            Do they ever need to change the found set (ie find a subset of the total records available to them)? If not, you can do your Find on open and then take away the ability to change the found set (take off Find, Omit, Show All, etc). Or you can set security privileges which will restrict their found set regardless if they can search or not.

            • 3. Re: To find or not to find...
              PaulWebb

              I would replace the global variable that you set with a global field added to the portfolio table.

              I created a global field and set it using the variable I had created. I know I could have killed that part and instead of the variable just set the field but it was quick and easy.

               

              Now you can create a related table occurance to the records for that portfolio using the global field of the parent equal the primary key of the child.

              Done

               

              On your layout you can now show all the related records using a portal.

              In the Portfolio table there will only be one record for the portfolio. And I can't show the trouble ticket records via a portal because I have to show RMA and defect records in portals in the trouble ticket records. I saw a doc online about using self joins as the best way to limit record views but I lost it. From what I remember it sounded a lot like what you are trying to stear me to do. I just haven't wrapped my head around it yet.

              • 4. Re: To find or not to find...
                PaulWebb

                They will need to be able to find open records or closed records. I thought about what you suggested with some preset find scripts.

                • 5. Re: To find or not to find...
                  PaulWebb

                  found it.

                  http://help.filemaker.com/app/answers/detail/a_id/3402/~/limiting-access-by-record

                   

                  Seems like this is what I need and what Johnners was trying to explain. If I use the portfolio as the relationship does that mean that every record has to have the portfolio number? I ask because they all have a contract number which is related to the portfolio number.