October 10, 200718 yr I'm trying to setup a login script that will find all records created by that user on login. Is there a generic calculation rather than setting up a long winded 'case' script for every user? I addition to this it would be great if named system administrators could see all records on login? Thanks for your help.
October 10, 200718 yr Have you got a staff file/table? If not create a 'Users' table and create a record for each user (that can be automated). Add fields for whatever information you want to store for users such as find requests. Make a relationship to this table based on the user name or ID. Then make your find using fields from that table. No logic needed at all when done like this, Norman
October 16, 200718 yr Author I'm trying to create an IT Support database for a small amount of users 30+ and this seems a bit longwinded. There must be a relatively straight forward script that ideally says find all records for the currently logged in user? If not I need a script that says if user name is John Smith find all records for John Smith etc all the way through the staff list? I would much appreciate some further help on this. Thanks.
October 16, 200718 yr You need an Account for each person, and at least 3 privilege sets; Full Access (duh), Manager, and Users. You can name the last two whatever you want. You can create these accounts in all files via script, starting from the users (or Staff) table. Look at the Account section of the script steps. You must have a text field that auto-enters the creation account name (last option of creation choices). Or you must assign records to people using the field. "Users" cannot change this field. If they also cannot even view others' records, then you can restrict their Record-level access View options to: User field = Get (AccountName) But this will slow down the file considerably. Alternatively you can do the above for their Edit access, so they can only edit their own records; that will not slow the file down. Then, in relevant files, a script that runs on open (File Options) Allow User Abort [Off] Set Error Capture [On] If [ Get ( PrivilegeSetName ) = "User" Enter Find mode [] Set Field [ user text field; Get (AccountName) ] Perform Find [] If [ Get ( LastError) <> 0 ] Beep Show Custom Dialog [ "You do not have any records"; "OK" ] Close File End If End If
Create an account or sign in to comment