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.

Multi Level Access.

Featured Replies

I have a file that requires 3 levels of access.

Manager (see everything)

State manager (See only records that are in their state)

User (see only record that belong to that user)

Using "define accoutn and privs" I've managed to get Manager and user to work with

"custom record privileges". Setting it to limited and using

AccountName = Get ( AccountName )
 to set the user level and show only record that belong to that account name.



Manager has view everything so that was no problem



This was working fine until they requested State managers will need to see all records that belong to their state.. My thinking on this was along these line...




If ( Get ( AccountName ) ; Users profiles::State ; 1 )

The thinking behnd this is if the account name (ie VIC) matches the State (IE VIC) then show record, if not then don't.

This isnt working.. am i heading in the right direction, or is there a better way?

Hope this makes sense.

Cheers

Al

If( Get(AccountName) = AccountName and Table::State = globalTable::userState ; 1 )

Essentially, add a globals table, for your startup script, go to the users profiles table, find the user's account record, and set a global field calld userState to the value of that user's state.

Then you have constant access to it.

If you don't know how to add a global field, simply create a text field, go to storage options and click use global storage.

  • Author

Hi Genx... Thanks for that, I'll give that a go, and see what happens.

Just a thought... If there is a global State in there, wouldnt that mean we couldnt have other states (ie NSW, ACT and so on)

i think im missing your point sorry.

Cheers

Al

Huh?

No, the point of the global state field is specifically to temporarily store the value of the person that is logged in.

So if you had 10 people logged in, the global would be storing a different state for each person (whatever state they are responsible for supervising).

Myeh, take a look at this, and see if it helps: http://faq.filemakermagazine.com/index.php/Global_fields

  • Author

Sorry Genx.. im completly missing what your saying.. im sure that its very simple once you get it...

Could you explain again, in complete dummies terms

or do you know of an example that i could pull apart and have a look at?

Just to set the scene, im a Graphic Designer that fell into FMP, rather than a programmer. IE im a dummy left brainer, not a logical right brainer

:

I'm a... No Brainer, but i think you may have your hemisphere's backwards lol :

There are 4 accounts:

User, Pass:

NSW, NSW

VIC, VIC

QLD, QLD

Admin,

Note that the actual account names have nothing to do with the way this works - they have just been named as the states to make the demo easier.

HTH

multiLevelSecurity.zip

Create an account or sign in to comment

Important Information

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

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.