1 Reply Latest reply on Jul 19, 2012 6:39 AM by philmodjunk

    Help! - Dynamically restrict/allow multiple users access to records



      Help! - Dynamically restrict/allow multiple users access to records


      Hello, I've read up on the Privilege Sets and was able to set it up for record access for a single user. I'm now stuck on how to dynamically allow specific as well as multiple users access to the same record.


      For example...

      I have the following tables...Patients, Care Period, and Nurses.

      For a given Patient, s/he has one or more CarePeriod records.

      For a given Care Period, one or more Nurses are assigned and removed from it as needed.

      For the single user access setup, the Patients::NurseAccess field pulled the login name of the assigned nurse's login name from the Nurses table when their name was selected from Patients::NurseSelection dropdown box. In the custom Privilege Set - View access, I used Get(AccountName) = Patients::NurseAccess, which worked fine.

      For the multiple users access setup, Patients::NurseAccess now has multiple nurse logins in it:




      Without changing my custom privilege set, only NurseA can view the patient's record. NurseB or NurseC does not have access to view the Patient record.

      Is it because the Privilege Set formula only checks the first returned value from the now multi-value field, Patient::NurseAccess? If so, how do I create a formula in the Privilege Set to check a Nurse's login name from a field that contains multiple login names?

      The reason for this setup is that when some patients are not happy with a particular nurse from their assigned nurse pool, the nurse has to be rotated out and a new nurse is rotated in.

      If my above setup is wrong or not ideal, what would be the ideal setup where the office employee can assign and remove, on demand, one or more Nurses' access from a Patient's record.

      I hope I have explained it correctly.

      Thank you for your help!

        • 1. Re: Help! - Dynamically restrict/allow multiple users access to records

          What "lock" expression are you using that only allows access for NurseA?

          The expressions I can think of would either work or not allow any access when two or more nurses are listed in the same field. On the other hand, a related table can be used to list assigned nurses and the wrong expression could then permit the nurse listed in the first related record and not any of the others.

          The details of how you are assigning multiple nurses will determine the details of the lock expression that will permit all assigned nurses to have access.

          If you do have a single text field with a return separated list of NurseID's in it to list all assigned nurses, an expression such as:

          Not IsEmpty ( FilterValues ( ListOfAssignedNursesField ; CurrentNurseID ) )

          And a similar expression:

          Not IsEmpty ( FilterValues ( List ( AssignedNurses::NurseID ) ; CurrentNurseID ) )

          IF you use a related table to list the assigned nurses.