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.

Restrict Access to a Tab Panel

Featured Replies

I have a layout that has many tab panels. We are using Filemaker 12. There is one tab panel that only a couple people should have access to, I thought i could assign a script to OnTabSwitch, so if you were a member of a certain privilege set you'd get a message and be redirected back to the tab you were on.

 

I get the message to come up but it won't Go To Object, I'm somewhat frustrated, it seems like it should be rather simple.

 

The script is attached, I have  a few extra steps because I have been messing with this issue for a while today.

 

Any help would be GREATLY appreciated! Thanks

 

post-65628-0-04740400-1406049555_thumb.p

The idea here is to cancel the triggering event by exiting the script with a false result, for example:

Allow User Abort[Off]
If [ GetValue ( Get(TriggerTargetTabPanel) ; 2 ) = "MyRestrictedPanel" and Get(AccountPrivilegeSetName) ≠ "AllowedPersonnel" ]
 Show Custom Dialog [...]
 Exit Script [Result: 0]
End If

This will result in user remaining on the current tab panel when the two conditions above are true.

 

 

IMPORTANT:

This is purely a cosmetic device. There is no real security in anything that's set up using layout measures. Always use accounts and privileges to make sure users cannot access data they are not supposed to see or modify.

[…]
If [ Get(TriggerTargetTabPanel) = "MyRestrictedPanel" and Get(AccountPrivilegeSetName) ≠ "AllowedPersonnel" ]

 

Just to confuse matters a bit:   :smile:

 

Get ( TriggerTargetTabPanel ) returns a list with the index number and the object name (if any) of the target tab, so UIM, the above expression should read:

If [ GetValue ( Get( TriggerTargetTabPanel ) ; 2 ) = objectName … etc. ]

http://fmhelp.filemaker.com/fmphelp_12/en/html/func_ref2.32.86.html#1053326

@eos: you're absolutely right. I have edited my previous answer. Thanks for the catch.

  • 2 weeks later...
  • Author

I meant to thank you for your help, it worked! I had the first part right it was the Exit Script [Result: 0] that I missed! Ugggh!

 

It's the little things!  :laugh2: 

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.