7 Replies Latest reply on Apr 28, 2015 11:31 AM by philmodjunk

    Allow users to only view certain records?

    ValBerechet

      Title

      Allow users to only view certain records?

      Post

      I'm looking to setup a solution for sales reps via WebDirect to where each sales rep can login but only be able to view records assigned to them.

      How difficult would this be to setup? 

      Right now I have a layout that has a drop down with each sales rep name. Could I make additional layouts and have some sort of identifier for each sales rep and then when they log in with their user, that user is only allowed access to that layout/records?

        • 1. Re: Allow users to only view certain records?
          philmodjunk

          Each Sales Rep should have their own log in account and password. This can then be used to identify them and to control which records are accessible to them.

          To get started on this 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 description of how to set this up.

          • 2. Re: Allow users to only view certain records?
            ValBerechet

            Thanks PhilModJunk. I'm trying to follow the directions you pointed me to but keep getting an error. Any insight on what I might be doing wrong? I want to set the privilege that it only shows records where Type = Sale (values include "Active Lead", "Dead Lead" and "Sale").

             

            • 3. Re: Allow users to only view certain records?
              philmodjunk

              clearly "sale" is not the name of any field in your table--to explain the error message.

              type = "sale"

              would be the expression to use if access is permitted only when the text "sale" is selected in the type field. Make sure that type is defined as a field of type text.

              • 4. Re: Allow users to only view certain records?
                ValBerechet

                I had it in wrong, Type = "Sale" does work :)

                Now when X user logs in, they see all records but for records where Type does not equal Sale, it says No Access in all fields.

                I'd love if I can somehow make it to where when X user logs in (via WebDirect), they don't see all records but only the records where Type = Sale and they don't see a total number of records. So for example if I have 15 records and 10 of then = Sale, they would only see that there are 10 records in the database and wouldn't even be aware of the other 5. Is that possible?

                 

                • 5. Re: Allow users to only view certain records?
                  philmodjunk

                  Any find performed by the user or a script will automatically omit all "no access" records so you only need add a scripted find to exclude them. That leaves "show all records" and "show omitted only" as the only two actions that can bring back the "no access" records. If you have FileMaker Advanced, you can set up the layout with a custom menu that omits those menu options or that replaces them with scripts that Show all permitted records and Only permitted, omitted records.

                  • 6. Re: Allow users to only view certain records?
                    ValBerechet

                    Can you guide me on adding a script for just this particular X user? I see that in File Options I can setup script triggers, but that seems to be universal for all users? I as the Admin (as well as other management user, who are not set as Admin, but have more privileges than X user) would like to see all records types (not just Type = Sale). 

                    Basically I guess I need to have the program do...When X user logs in (via WebDirect), do a Find for Type = Sale, correct? 
                    I kind of thought that is what the Type = "Sale" was doing, but I guess not?

                     

                    • 7. Re: Allow users to only view certain records?
                      philmodjunk

                      This can be a universal script for all users.

                      Example script:

                      Say you have a field in YourTable named __pkTransactionID that auto-enters a serial number and thus is never empty. (Any field that is never empty can be used in this example.)

                      Go to Layout ["YourTable" (YourTable) ]
                      Enter Find mode [] ---> clear the pause check box
                      Set Field [YourTable::__pkTransactionID ; "*" ]
                      Set Error Capture [on]
                      Perform Find []

                      With a full access user, this script finds all records. With a limited access user, this same script only finds those records that they are permitted to view--such as all records of type = "sale".