November 2, 200718 yr Newbies Hi all! I have a very flat table of information I'd like to make available to employees. I'd like them to login with their own account, and have FMP find only their records, and let them print, but not allow them to see other records (of other employees). Is there a simple script way to allow access only to a found set on login? I'd love to see this happen: user A logs in, a find command happens for all user A records. User B logs in and sees only a list of User B records. I'd think that would be defined via the accounts and a Script of some sort. Any ideas or resources would be welcome! Thanks Rob
November 2, 200718 yr This is somewhat similar to this recent thread: http://www.fmforums.com/forum/showtopic.php?tid/191074/post/271382/#271382
November 2, 200718 yr Author Newbies Awesome, thank you. That sounds exactly what I need. I have a hard time coming up wiht the right search terms when I have no clue. I appreciate the pointer. rob
November 2, 200718 yr Author Newbies Hey there, I've spent some time with your solution, and I"m wondering if it might be too much for the db I'm creating. I have a flat db, with specific data that is imported to it. I'd like to have an opening Script that gets the AccountName and then finds the records that match the AccountName to one of the fields in the table (i made sure the AccountName and field will have the same data). I'm looking for some syntax, though. I'm so new to scripting FMP, that I'm just not sure what to put in there. In plain english, I need these steps: 1 - Login 2 - Get AccountName 3 - Find all records where AccountName is the same as Field X 4 - Show Found Set Any ideas, or other threads to look at? thanks! rob
November 2, 200718 yr Simplest script, let's name it "Find My Records": Enter Find Mode Set Field [ Field X; Get (AccountName) ] Perform Find The Get (AccountName) function is available in Find mode. To have it run on opeing the file; go to File menu, File Options, "When opening this file" [x] Perform script, "Find My Records" FYI, there is also an auto-enter option, down at the bottom of the auto-enter data (CreationDate, etc.), for "Account Name". This allows you to automatically tag records which people create; if you want to do that. It should be a Text field.
November 7, 200718 yr now, since this is a flat table, shouldn't a show all with 'view' privledges set correctly be sufficient? I'm working on a similar issue, and hope I'm not missing the glaring. Edited November 7, 200718 yr by Guest
Create an account or sign in to comment