Jump to content

  •  

Photo

Restrict Access to a Tab Panel

tab panel script trigger security

  • Please log in to reply
4 replies to this topic

#1 Answers  designer/developer

Answers
  • Members
  • 92 posts
  • FM Application:13 Advance
  • Platform:Cross Platform
  • Skill Level:Intermediate
  • Membership:TechNet
  • Time Online: 1d 8h 7m 51s

Posted 22 July 2014 - 09:19 AM

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

 

Attached Thumbnails

  • v2.mdisusa.com Screen Capture 1.png

  • 0

#2 comment  consultant

comment
  • Members
  • 24,556 posts
  • Time Online: 344d 8h 20m 35s

Posted 22 July 2014 - 09:49 AM

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.


  • 0

#3 eos  Paris 2016 … :-)

eos
  • Members
  • 1,175 posts
  • LocationTegernsee, Bavaria
  • FM Application:13 Advance
  • Platform:Mac OS X Mavericks
  • Skill Level:Intermediate
  • Membership:TechNet
  • Time Online: 222d 14h 40m 9s

Posted 22 July 2014 - 10:07 AM

[…]
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.filema...86.html#1053326


  • 0

#4 comment  consultant

comment
  • Members
  • 24,556 posts
  • Time Online: 344d 8h 20m 35s

Posted 22 July 2014 - 10:26 AM

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


  • 0

#5 Answers  designer/developer

Answers
  • Members
  • 92 posts
  • FM Application:13 Advance
  • Platform:Cross Platform
  • Skill Level:Intermediate
  • Membership:TechNet
  • Time Online: 1d 8h 7m 51s

Posted 04 August 2014 - 09:40 AM

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: 


  • 0





Also tagged with one or more of these keywords: tab panel, script trigger security

FMForum Advertisers