July 1, 200916 yr As i can find no current way to setup individual login scripts for each user, i wanted to created a global login script that specifies each user but i wanted to make sure something like this would be possible as i cannot find any examples anywhere for what i want to do. I have a field in a table called Case_Manager which contains a value list of all the case managers we have. The names of the case managers in the value list match the usernames of the case managers. What i want to attempt to do is create a login script that will allow the case managers to view only the records that have their name in the Case_Manager field, something like: If current user = ABC then ...allow only ABC records else if current user = CBA then ...allow only CBA records and so on. Is this a possibility? Edited July 1, 200916 yr by Guest
July 2, 200916 yr Author Do an advanced search for +Record +Level +Access After setting up the priviledge sets last night i found an easier way to accomplish this. Since the field for case manager holds the same value as the username, i was able to accomplish this by doing the following: On the Custom Priviledge Set dialog under the Set Priviledges option for View, i chose limited and used the following calculation: Case_Manager = Get(AccountName) The result was that the user is able to browse through all of the records, but any record that does not contain that user in the Case_Manager field, shows up as No Access in all fields.
July 2, 200916 yr What you found was RLA. That's exactly what John was referring to. One point, I don't count on populating AccountName in the record. I know it's easy, but what if you change the AccountName? You might. Jane Smith gets married and wants her account name to be JThompson now. So, I do a find in my open script in my staff table. It goes to Staff, enters find, sets AccountName to Get (AccountName) and finds. It'll find JThompson's record. Then I set gStaffID to her StaffID. In each table I have zz_StaffCreatedID, which is auto-entered to gStaffID. My RLA is if gStaffID=zz_StaffCreatedID. Now, I can change accountnames without breaking my RLA. Just a suggestion.
July 2, 200916 yr Author I dont have a table for the users. I only have a field that contains a value list of the case managers which contains their initials. Their username is also their initials. If their name changes for whatever reason I will have to update their username as well as the value list and everything should stay functional. The database im working on will only be accessed by 20 users max so i don't forsee an issue. Thank you for the suggestion though, i will keep it in mind for future databases.
July 2, 200916 yr No, it won't stay functional. If you change the value list, then they won't see any existing records. They'll just see new ones that they create.
Create an account or sign in to comment