3 Replies Latest reply on Apr 22, 2009 3:54 AM by Jade

    access privileges by checkbox?

    donok

      Title

      access privileges by checkbox?

      Post

      Hello!  I want to have a simple checkbox on all my records that makes that record as public, allowing a simple read-only account to view, etc.

       

      Is there a way to define a Privilege Set (is that the right ay to do it?) by a checkbox on the record?

       

      thanks in advance, Don 

        • 1. Re: access privileges by checkbox?
          Jade
            

          Hello Don,

           


          donok wrote: 

          Is there a way to define a Privilege Set (is that the right ay to do it?) by a checkbox on the record?


           

           Yes, defining a Privilege Set is probably the best way.  However, the data on records that are not checked will be displayed as "<No Access>". You may want to omit the private records when the user logs in to constrain the found set.

           

          I assume for this example that you have setup a checkbox field called "Access" with the value "Public" on your table and layout

           

          • Choose the menu item: File>Manage>Accounts & Privileges… 

          • Click the "Privilege Sets" tab

          • Click the "New" button

          • Select "Custom privileges…" from the Records pop-up menu

          • Select the table name(s) that you want the user to have limited viewing access

          • Select "limited…" from the View pop-up menu

          • Select the checkbox field "Access" from the list of field names

          • In the box entitled "Records can be viewed when:", enter the calculation:   Access = "Public"   

          • Click the "OK" button

          • Set the Edit, Create, and Delete pop-up menus to "no"

          • Set the Field Access to either "all" or "limited…" as you want

          • Click the "OK" button

          • Set the Layouts, Value Lists, and Scripts pop-up menus as you want

          • Click the "OK" button to complete the Privilege Set

          • Add a new Account and assign the privilege set to it.  

           

          Hopefully, I have not skipped too many steps above but this should get you started. 

           

          • 2. Re: access privileges by checkbox?
            donok
              

            Perfect - but, it leaves me with an odd result when I sign on as a guest - all the excluded records are there with the results replaced with <no access> -- is there a clean way to have these omitted?  I did a start-up script to find only the "Public" records - is that the best way?

             

            thanks so much,

            Don 

            • 3. Re: access privileges by checkbox?
              Jade
                

              donok wrote:

              I did a start-up script to find only the "Public" records - is that the best way? 


              Probably.  I used a 'Constrain Found Set [Restore]' with the Omit action whenever the Layout is accessed.  Either way the user can still see the "<No Access>" tags if the user selects 'Show All Records' menu item so I also disable that for these users in a custom menu (you need FMP Advanced for that). That's the problem (advantage) with FMP; there is no end to the number of ways. :smileywink: