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.

Allowed by field value

Featured Replies

I was just reading here http://fmforums.com/forum/topic/28989-best-calculation-for-custom-record-privileges/

 

Steven says be careful about people being able to change this data.  Here is my situation please if someone could help

 

 

I have a table called Users with a field called Type.  This means they can only change records which also have this Type field in them.  But when I go to set up their privilege set, the calculation box is throwing me.

 

If(User::Type = Sales Orders::Type)

 

but how will the calculation know which user I am referencing?  All I can think to do is put the person's type into a global variable when they log in and then calculation would be If($$userType = Sales Orders::Type)

 

Is this right or does that open up problems?  If $$userType is global, is it insecure?  Or is there other way of doing what I need.  Thank you.


Oh and I meant to say that the users table is only allowed to even see by our owner and me of course so nobody could change the type.

There are two possible solutions here:

 

1. Define a relationship between the two tables, using an unstored calculation filed in the Sales Orders table =

Get (AccountName)  

to match a stored AccountName field in the Users table. This way (and only this way) will the calculation know which record in Users to look into.

 

Of course, you will need to repeat this for every table where you want to consult the user's record, so it might be more convenient to:

 

 

2. Populate a global field with the current user's type. Note I said a global field, not a global variable. And you must be "careful about people being able to change this data" - IOW, define this field in the Users table to which no one has access.

  • Author

Can I set a global field in another file?  It looks like it works but that might just be because I am the only one I can see anyway so my view of the universe is limited and I am not network or anything.

  • Author

Well of course it works.  I was not thinking.  I get confused when in the data viewer.  Does the WATCH only ever be something I see?  For example, if I am watching fields in a file and I give that file to someone else and they have advanced and open the data viewer, do they see what I have in my WATCH list?  

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.