6 Replies Latest reply on May 28, 2014 9:30 AM by user22711

    Limiting Records on Login

    JasonKrueger

      Title

      Limiting Records on Login

      Post

      I am trying to limit the records shown to equal the account name on the login. 

      I have it set up to automatically affliate a record with the user by account name, but am having difficult limiting the records they can view so that they only show the items they have "ownership" in. 

       

      Thanks

        • 1. Re: Limiting Records on Login
          philmodjunk

          Step 1: Set up Record Level Access control so that users can only access records with their account name.

          The Lock expression might be: Get ( Accountname ) = YourTable::AccountNameField

          See "Editing record access privileges" in FileMaker Help and check out this particular sub section: "Entering a formula for limiting access on a record-by-record basis" for a detailed description of how to set this up.

          Step 2: Open Field Options and select the options to perform a script automatically when the file is opened. Include a performed Find in this script. This will hide all prohibited access records which would otherwise appear as <<No Access>> on your layouts. Any find that finds records will work. Records that are "No access" will be automatically omitted from the resulting found set.

          • 2. Re: Limiting Records on Login
            JasonKrueger

            I'm sorry, I feel like I'm must be blind. I have read the entire help message mentioned, and have scoured the Privlege Sets dialog boxes, and cannot find where I am able to put in the lock expression. This seems very straight forward, and was the advise I was running into all over the forum, I just could not find where to do it. I am using FMP 12, if that matters.

            Thanks

            • 3. Re: Limiting Records on Login
              philmodjunk

              Open Manage | Security

              Create a new account or edit and existing one.

              Open the privilege set for editing.

              In the Records drop down, select "custom privileges"

              Click a table to select it and then pull down a drop down list at the bottom and select "Limited..." This will open the specify calculation dialog where you can enter your lock expression.

              • 4. Re: Limiting Records on Login
                JasonKrueger

                Thank you. I saw that limited, but did not coorelate it to the place where you might put in an expression. I appreciate it. 

                • 5. Re: Limiting Records on Login
                  user22711

                       I am implementing this now... I did a few tests and it works well.. is the opening script to go to every layout in the solution and execute the performed find?

                       How about just putting the Performed finds in the OnLayoutEnter Load Script Trigger?

                  • 6. Re: Limiting Records on Login
                    user22711

                         Also, what about error trapping on start-up or on layout load script triggers? Early on when the solution is first used there may not be records?