4 Replies Latest reply on Sep 18, 2016 8:22 PM by jlan2205

    Limiting modification access to a subset of records

    jlan2205

      I'm a fairly modest user of FM but have been using it for a number of years.

       

      I need to set up a privilege set that limits the User to modifying those records "owned" by their group but still being able to add new records into their group. They can see all the records but only modify/add recrods in their group.

       

      The groups are CLUBS so one thought is to have the Club owner log on with the Club name as their logon and use that to make the constraint in a privilege set.

       

      Any simple suggestions welcome. As I said I'm a basic user.

       

      The file in question can be seen at n35.fmphost.com and is called PFA Portal. The table in question is Players.

       

      Thanks

       

      Jeff Langdon

        • 1. Re: Limiting modification access to a subset of records
          philmodjunk

          You seem to have the basic idea.

           

          You can set up a table of Clubs with a field that lists all account names for users that are a member of that club.

          Logging in triggers a script that looks up the club to which a user is a member and loads the Club ID into a global field or variable.

          Any new record can auto-enter that Club ID from the global.

          You can then set up an expression that compares the auto-entered club ID with the current user's club ID (the value in the global) to determine whether or not the user has edit rights for the current record.

          1 of 1 people found this helpful
          • 2. Re: Limiting modification access to a subset of records
            jlan2205

            Great. I only intend to have one user for each club, so I should be able to have them log on using the Club name as their account name.

             

            I'm not an advanced user of privilege sets. (to tell you the truth I've  hardly used them at all!).  How do i say  ... if you log as as <<Club Name>> you can only modify/add records for that Club?

            • 3. Re: Limiting modification access to a subset of records
              philmodjunk

              Open Manage Security.

              Set up the privilege set you will use with these accounts.

              In the tmenu for "Records", select "Custom Privileges". Select the table for which you want to set these limitations and then select "Limited"

              Then enter an expression such as:

              AccountNameField = Get ( accountName )

               

              Where I have used "accountnamefield" refer to a field in your table that auto enters the creator account name. If you already have data in your table before you add this field, you will need to also update the existing records to show the correct account name.

               

              This will then limit edit privileges to just those created by the current user's account.

              • 4. Re: Limiting modification access to a subset of records
                jlan2205

                Thanks a lot. You've been a great help. I think Ive got it now.