brandie Posted March 27, 2007 Posted March 27, 2007 Hey everyone, I'm designing a database that will have information in fields that may or may not be confidential. Rather than creating separate confidential and nonconfidential fields for each piece of info, I was hoping it might be possible to have a checkbox for fields that can be activated when the info is confidential. The question is, how can I do this without creating a checkbox field for every single field that I am making? Not possible?
mr_vodka Posted March 27, 2007 Posted March 27, 2007 I think this would be best served through access/privileges. You can create field level access with a custom privilege set. Depending on who has access they can see the data or not.
brandie Posted March 27, 2007 Author Posted March 27, 2007 Oh, the reason that I asked this in the layouts forum is that I was thinking the solution might be something to the effect of: If the checkbox is checked, then change the field to "Do Not Print" in the layout. Bonus points would be having a DropDown menu that sets levels of confidentiality or something like that for various users.
brandie Posted March 27, 2007 Author Posted March 27, 2007 Thanks for your quick response MrVodka. Would I have to design custom layouts for the various users? Or would the fields they don't have access to just not show up?
mr_vodka Posted March 27, 2007 Posted March 27, 2007 The fields that they do not have access to will display . If you need to selectively Hide these fields then take a look at the technique in this thread: Field Visibility
David Jondreau Posted March 29, 2007 Posted March 29, 2007 First time I've seen that technique. Brillant. Hats off to Ray! G
brandie Posted March 29, 2007 Author Posted March 29, 2007 That's a very good idea that I may end up utilizing. However, one reason why I wanted to have a "checkbox" feature is that sometimes the data we have in a field, such as a phone number, is confidential, but sometimes it's not. I was hoping to have a solution that we could choose to hide the info on a record-by-record basis without having to create a confidential and non-confidential field for each piece of data.
mr_vodka Posted March 30, 2007 Posted March 30, 2007 You dont need to create 2 records for each piece of data. You can still use your checkbox. The checkbox could be used to flag in either one of the methods I posted.
brandie Posted March 30, 2007 Author Posted March 30, 2007 So would I create a checkbox for each field that might be confidential, and then set up user parameters that says if the checkbox is checked, then the user doesn't have access to that field? Sorry, I'm kind of new at this.
brandie Posted March 30, 2007 Author Posted March 30, 2007 Preferably for on-screen browsing as well, but if there is a solution that works for printing only, that would be sufficient.
comment Posted March 31, 2007 Posted March 31, 2007 Well,it doesn't matter much - as long it's not for data entry/edit. The thing is, Filemaker's built-in security doesn't have this level of granularity - where you can set the privileges individually for each field in each record. So you will have to build this yourself, using calculation fields to display the data or not, according to the current user's privileges. The good news is that since this is for display only, you can use repeating fields to make this chore simpler. The bad news is that this is still a lot of work, and it can get quite complex. I am attaching a basic sketch of the technique. This could be modified extensively - depends on how many fields you need to control this way, do they need to be formatted as a number/date, etc. Note that since this is purely a display device, users can still see the original fields - if they are placed on an accessible layout. So you need to control layout access very carefully in Accounts & Privileges. PerFieldAccess.fp7.zip
brandie Posted April 2, 2007 Author Posted April 2, 2007 Wow comment, now that I'm taking a closer look at this, this is *exactly* what I need!! I'm very impressed. This is above and beyond the call of duty, but can you help me walk through the main function that pulls it all together so I know what's happening? The one that says: Case ( Get ( PrivilegeSetName ) = "[Full Access]" or not IsEmpty ( FilterValues ( Get ( PrivilegeSetName ) ; FieldPrivilegesR ) ) ; Extend ( GetField ( gFieldNameR ) ) )
comment Posted April 2, 2007 Posted April 2, 2007 In plain (well, as much as I can) English: If current user belongs to one of the authorized sets, fetch the data from the field.
Recommended Posts
This topic is 6445 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now