9 Replies Latest reply on Mar 30, 2011 1:25 PM by philmodjunk

    Custom Privilege Sets



      Custom Privilege Sets


      Hi All,

      I would like to set up a privilege set with strict tailored access. I have a field that contains a value list of three options: Feature, Television, and Animation. I want to create a privilege set that can only view the "feature" records.

      Let me know if this is possible or needs more explaining.

      Thanks for your help!


        • 1. Re: Custom Privilege Sets

          It depends on the value list. If it is limited to a single value, you can use this expression:

          ValueListField = "Feature"

          If this is a checkbox formatted field where more than one value can be selected, you'd need to use an expression with the FilterValues function.

          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.

          • 2. Re: Custom Privilege Sets

            I am still having some issues:

            1. I set up a privilege set that can only view the records that have "feature" entered into the "Department" field; however, when I am signed into that privilege set I cannot create new records even thought I set up the privilege set to be able to create new records.

            2. Is there any way to set it so the privilege set can only view the "feature" records, instead of having it say "No Access" for any records that don't equal "feature"? To be more specific I would like the database to be permanently filtered when this privilege set is logged in to only view "feature" records.

            Thanks for your help,


            • 3. Re: Custom Privilege Sets

              1) Check your settings. This should be possible to do. I can't see what you've selected for your privilege set from here so that's all I can tell you. Perhaps you restricted the menu options too strictly?

              2) If you perform a find, any find, <<no access>> records are automatically omitted from the found set. You can set up a script to perform a find when the file is first opened.  Here's a script that will find all records that the current user is permitted to view:

              Enter Find Mode[] // clear the pause check box
              Set field [Table::PrimaryKeyField ; "*"] //specify any field that is never empty
              Set Error Capture [on]
              Perform Find[]

              Once you've done that for any table where you have record level access settings, the only way a user can encounter <<no access>> at the record level is if they use Show All Records or Show Omitted Only--both options that can be removed or replaced with your own scripts if you use FileMaker advanced to set up a custom version of the records menu.

              • 4. Re: Custom Privilege Sets

                Thanks for your help!

                Where would I put that script so that it only triggers when the specified privilege set signs into the database?

                • 5. Re: Custom Privilege Sets

                  Use File Options to select that script to run when the file is opened.

                  • 6. Re: Custom Privilege Sets

                    I put in the script that you gave me and nothing has changed. I thought that maybe I need to save your script and then enter:

                    Perform Script [xxxx]

                    But that also did not work.

                    Any suggestions?

                    • 7. Re: Custom Privilege Sets

                      Take out set error capture and try again to see if you have any problems with the find. The user must also have field access to the fields in order for this script to work correctly.

                      • 8. Re: Custom Privilege Sets

                        I took out the set error capture and a window popped up the next time I opened the database, that said "The Provided find criteria is not vailid. Enter a valid request beofre proceeding."

                        The user also has access the fields.

                        Any other ideas?


                        • 9. Re: Custom Privilege Sets

                          Here's a demo file with very simple record level access control demonstrated. You can open the file with Admin and No password to open it with full access. You can open it with limitedaccess as both the account name and also as the password to open it with limited access.

                          Compare it to yours and see if you can spot what's different.

                          http://www.4shared.com/file/oi2X1olL/RecordLevelAccessDemo.html (Click blue download button)