2 Replies Latest reply on Mar 20, 2012 8:41 AM by PaulWebb

    Baby Developer SOS - Record access

    PaulWebb

      Title

      Baby Developer SOS - Record access

      Post

      I am building a DB for support tickets. The DB has multiple customers in the DB and I want to restrict the view by customer. Customers all have a unique portfolio number which has their contracts tied to them and support tickets all have a contract associated.

      An over simplified breakdown of my setups is...

      4 tables: Preferences, Customers, contracts, support tickets

      the relationshps are: Preferences::portfolio--Customers::Portfolio; Customers::Portfolio--Contracts::Portfolio and Contracts::contract--Support Tickets::contract

      I created a preference page where the user can enter the Portfolio they manage. By doing so it allows them to see the support tickets. The two problems are that they can also see other records as 'no access' and if a contract is not assigned to a portfolio they can see those support tickets as well. I only want them to be able to see the support tickets that are tied to contracts in their portfolio. My guess is I need to write a better formula for the privilage set. Currently for viewing records it is just Preferences::Portfolio = Customers::kp_ID_Portfolio.

      Can someone point me to some docs to check out or vods?

      Any help is appreciated.

      FM Pro 11 Adavanced

        • 1. Re: Baby Developer SOS - Record access
          philmodjunk

          if a contract is not assigned to a portfolio they can see those support tickets as well.

          Seems you need a "lock expression for the contracts table as well.

          they can also see other records as 'no access'

          Any find performed will automatically exclude 'no access' records even if they match the specified search criteria.

          You can use a script such as this:

          Enter find mode [] // clear the pause check box
          Set field [YourTable::AnyFieldThat'sNeverEmpty ; "*" ]
          Perform Find []

          This will find all records for which viewing access is permitted.

          If you have FileMaker advanced you can use custom menus to either disable Show All Records and Show Omitted Only or to replace the built in action with scripts that omit the access denied records.

          • 2. Re: Baby Developer SOS - Record access
            PaulWebb

            Thanks Phil

            After some more reading I realized that the privilage set restricted access and not the view. I'm working on implementing the find as suggested above.