April 6, 201510 yr I'm looking to setup a solution for sales reps via WebDirect to where each sales rep can login but only be able to view records assigned to them. How difficult would this be to setup? Right now I have a layout that has a drop down with each sales rep name. Could I make additional layouts and have some sort of identifier for each sales rep and then when they log in with their user, that user is only allowed access to that layout/records?
April 6, 201510 yr Automatic message This topic has been moved from "FileMaker 13 General Discussion" to "WebDirect".
April 6, 201510 yr It's very possible to do this. But it has next to nothing to do with Layouts. This process is called Record Level Access. Basically the way it works is that when some test is met, the user can see the record or do something to or with it. This is set up in the Manage Security area in the Privilege Set definition. Check FMF here for Record Level Access threads. Steven
April 6, 201510 yr Coupled with RLA, you will also build your navigation system so that users are kept to "their world." "Could I make additional layouts and have some sort of identifier for each sales rep and then when they log in with their user, that user is only allowed access to that layout/records?" Absolutely! Each sales rep would have a record in a People table (Staff table, if you'd prefer). That record would have a field account name, and you'd find that record on file open. See this demo. http://fmforums.com/forum/topic/95513-restrict-login-to-specific-account/?p=437878
April 27, 201510 yr Author Thanks for the replies so far. I haven't quite got around to the Sales Rep thing but this is pretty much the same thing, just with a different field. Over on another forum, someone said to use a formula so that it restricts the privilege to only show records that match a certain "Get". Not sure what I'm doing wrong but getting an error. I want to set the privilege that it only shows records where Type = Sale (values include "Active Lead", "Dead Lead" and "Sale").
April 27, 201510 yr I want to set the privilege that it only shows records where Type = Sale (values include "Active Lead", "Dead Lead" and "Sale"). Then write = Type = "Sale"
April 27, 201510 yr Author Awesome! It works! Now of course, one things leads to another... The records are still present, but show No Access in all fields. How do I go about automatically omitting the records that I don't want the user to see when they log in?
April 27, 201510 yr Author Comment: Can you help with how do I go about doing the find though automatically for that specific user logging in via WebDirect?
April 27, 201510 yr Use a startup script? http://www.filemaker.com/help/13/fmp/en/html/script_trigg.38.20.html#1033390
April 27, 201510 yr Author How do I set that script to only start when X user logs in though? It seems that is a global command? Or no?
April 27, 201510 yr You don't have to do anything for a specific user in the startup script. If you set your startup script to do a Find for * -- i.e., an asterisk -- in a field that always has data (the primary key field is a good bet), then FileMaker will return only the records the user's security settings allow. Note that the Find All command does not work this way -- it will include "no access" records. If you want to branch your logic for specific users, though, it is possible using Get(CurrentPrivilegeSetName), Get(AccountName) etc.
April 27, 201510 yr Author Yeah, that's what Im running into that the command works and X user can only see data in records where Type = Sale...but they can still see all record counts even though all the data fields say No Access. As an example, I have a total of 15 records. 12 are Sale and 3 are Active Lead. Right now, when X user logs in, they see there are 15 records. If they starting going to each one by one, they see the data in the records that have Type = Sale, and then when they get to Type = Active Lead, they just see No Access. I'd like when X user logs in, for the total record count to just say 12 and for X user to not even be aware of the total number of records. Does that make sense?
April 27, 201510 yr That will take some extra work: you'll need to hide/lock the toolbar and provide your own navigation buttons.
April 27, 201510 yr when they get to Type = Active Lead, they just see No Access. That's because you did not perform a find. If you had, they would see that there are 12 records found (out of 15 total), and they would never get to a <No Access> record by browsing. The only way they could get to them is by doing Show Omitted Only or Show All Records - two commands which they should not be able to call.
April 27, 201510 yr Author That's still script based though right? Above said that I don't have to do a script for a specific user, just a startup script for Find *. But then won't all users run that script when they login? I as the Admin want to see all records all the time, I just want X user that logs in via Webdirect to see only records where Type = Sale.
April 27, 201510 yr But then won't all users run that script when they login? Yes, they will. So? If the script performs a "bogus" find (i.e. searches for * in a field that cannot be empty), then you as the Admin will find all records. In addition, the script can look at the current user's privilege set and tailor the search criteria accordingly. Or not perform the search at all, if the user is Admin. Or perform the search only if the user is logged in via WebDirect. It's a script: it can do anything you want it to do, when you want it . Take control.
April 27, 201510 yr Author Aye this is over my head haha. Need to research more. Thanks for the help so far.
Create an account or sign in to comment