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.

Confidential Checkbox

Featured Replies

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?

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.

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

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

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

First time I've seen that technique. Brillant. Hats off to Ray!

G

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

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.

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

Is this only for printing?

  • Author

Preferably for on-screen browsing as well, but if there is a solution that works for printing only, that would be sufficient.

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

  • Author

Thank you very much for this info.

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

)

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

Important Information

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

Account

Navigation

Search

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.