7 Replies Latest reply on Nov 6, 2009 8:14 AM by senriz_1

    Conditional Permission Sets



      Conditional Permission Sets


      I'm a novice using FMP9Adv.  I have a db that consist of several schools and at each school is a various number of students.  These students are assigned to a particular school and personal information is stored on each student.  I need to create the ability to assign a user to selected students.  This user should only be able to view, edit, create records/forms, print, etc. the assigned students, and not any other student or the student's information.  I'm also thinking I need it to be where I can unassign a student from a User Account and re-assign to another User Account for whatever reason.  Is there a way I can set this up?

        • 1. Re: Conditional Permission Sets



          Yes you can.  check out "editing record access privileges" and look at using account names to limit access in the help index.  You seem to be looking to do the same thing, but instead of tagging each record with Get(AccountName) you would be looking to have a third party assign an accountname who would handle the record.


          1. create a value list of Mentors and attach it to a new "Mentor" field on each record in the "Student" table.

          2. limit the access privileges of the mentors to only view student records when:

                     Student::Mentor = Get(AccountName)


          Does this sound like what you're after?



          • 2. Re: Conditional Permission Sets
               Yes. Thank you!! I'll let you know how it goes.
            • 3. Re: Conditional Permission Sets
                 That was so easy.  Thank you!!
              • 4. Re: Conditional Permission Sets
                   Is it possible to sort all the students the mentor has accessed to when the mentor logs in?  For instance, say I have a 100 student records, and a mentor is responsible for 25 of those students.  When this mentor navigates to the Student Records all 25 are not the first 25 records in the list.  Is it possible to make those 25 records sort to the beginning of the list when a mentor logs in?
                • 5. Re: Conditional Permission Sets

                  Howdy senriz,


                  Rather than "sort", you'll probably want to "find" instead.


                  In FMP10 you could trigger a script to do this.  In FMP9, you'll need to activate the script manually:


                  Enter Find Mode []

                  SetField [Student::Mentor ; Get(AccountName) ]

                  Set ErrorCapture [on]

                  Perform find []

                  If Get (FoundCount < 1 )

                     ## Do what should be done if no students are assigned to this Mentor ##


                   Sort Records   ## Optional: ###


                  Put a button on the layout labeled "Find My Students" and have that button run the above script.


                  Is that what you're after?

                  • 6. Re: Conditional Permission Sets
                       Yes.  Thank you again!!
                    • 7. Re: Conditional Permission Sets
                         Sorry for the delay on getting back to you... got pulled off onto another project for a few days.  I just modified my current find according to your instructions and it works flawlessly.  Thank you so much!!