3 Replies Latest reply on May 17, 2016 10:04 AM by EssexBiker

    Filter records


      I am busy building a solution which will be accessible across multiple company sites via FM Web.


      I appreciate that I will be able to set user permissions, to restrict functionality, limit actions, and accessibility to layouts etc.


      I would rather like to limit users to view just the records pertaining to activity within their own site, or at the very least, only make the records for their own sight readily apparent to them.  More of a, present relevant records, than prohibit seeing anything from another site.


      (included are staff, complaints, absence, holidays and so on)


      So if, Fred logs on and he's based at the London site, he'll see just London's related records. Sally in Birmingham will just see Birmingham's related records.  It wouldn't be the end of the world if Sally  was clever enough to search and find a London record.


      All sites have a site ID, a user would be related to their particular site too, relationships to tables have been sensibly created with a _pk _fk,


      Would my initial thoughts of setting a variable based on the user's site ID, ( their base) and filtering be the way forward?  There will be I'm guessing upward of 30 layouts once completed, or would this be unwieldy?


      Just to throw into the mix, some users, ( senior managers, should be able to view all records, not just a particular site)  And a further throw in  being that there will be an area where I will store company forms and policies so that all can view & download.


      Views on how this would be best approached would be appreciated.


      All best wishes,

        • 1. Re: Filter records

          A couple of basic questions:

          1. What's the approximate volume of data?  The reason I ask is that FM's native portal filtering is great, up to a point - i.e. a couple of hundred records.  Beyond that, you'd be better off using relationships to filter the records that the user can see.
          2. How many sites are there?  If it's just a few, you could have a tick-box selector to control the filtering - user puts a tick against 'London' to see London's records, removes the tick to hide them, etc.  The field on which the tick-box is based could be a 'Boolean-style' global field (i.e. either set to 1 or 0), perhaps called SHOW_LONDON.  This is a tidy approach if you have up to about 10 sites, beyond which the dashboard may get a bit clumsy.


          Happy to provide more detail if you need it.



          • 2. Re: Filter records

            Dave's right. I might even use a native FileMaker FIND/SORT (script) instead of realtionship if the data set is really huge. Done in another window can be helpful, even if "off screen". I might then "gather the keys" to be able to then 'filter' by those in the original layout/window.


            • 3. Re: Filter records

              Thank you  Dave and Beverly for your thoughts on how to approach this , site wise, there are currently just 5, I couldn't see that rising significantly in my lifetime!


              Typically each site would have somewhere in the region of 30 to 40 staff records each. (Staff not FM users)


              Related records to either staff or the site could become rather significant, we're not a demanding organisation, if there were to be some degree of lag, they'll live with it!  ( Well, they have two choices.. LOL)