Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Possible to have unique users only see certain records?

Featured Replies

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?

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

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

  • 3 weeks later...
  • 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").

 

 Boolean.jpg

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"

 

  • Author

Awesome! It works! :D 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?

Any kind of find automatically omits records to which the user has no access.

  • Author

Comment: Can you help with how do I go about doing the find though automatically for that specific user logging in via WebDirect?

  • 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?

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.

  • 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?

That will take some extra work: you'll need to hide/lock the toolbar and provide your own navigation buttons.

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.

  • 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. 

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.

  • 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

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.