March 27, 200718 yr 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?
March 27, 200718 yr 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.
March 27, 200718 yr Author 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.
March 27, 200718 yr Author 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?
March 27, 200718 yr 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
March 29, 200718 yr Author 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.
March 30, 200718 yr 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.
March 30, 200718 yr Author 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.
March 30, 200718 yr Author Preferably for on-screen browsing as well, but if there is a solution that works for printing only, that would be sufficient.
March 31, 200718 yr 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
April 2, 200718 yr Author 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 ) ) )
April 2, 200718 yr 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.
Create an account or sign in to comment