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.

Controlling who can use button , or limiting a script run based on security.

Featured Replies

  • Newbies

Hi Everyone.. I have a question. I have inherited a FM Pro 4 (Win) database that has a script that is run from a button. I want to limit the people / groups from using and running this script or from hitting the button, because it is an administrator function. My question is... how to prevent or limit user from being able to run a script or using the button? I would appreciate any help you could provide.

Mike.

You can test with the Status(CurrentGroups) function. Realize that it returns all the groups a password belongs to in a return-separated list so you need to use the PatternCount function for the test:

PatternCount(Status(CurrentGroups); "GroupName")

This will return a 0 or 1 or a false or true that will allow an IF script step to determine whether they can run the script or not.

I usually take it a step further to make sure the group you are looking for is the one you actually locate. For example, imagine this simplified list of Groups returned by the Status(CurrentGroups) function:

10¶

20

The "¶" character is a return but won't really display when you look at the result of a calculation. The point is, what if I am looking for group "2". It will be located in the list above even though it doesn't really exist. Here is a better formula:

PatternCount("¶" & Status(CurrentGroups) & "¶"; "¶GroupName¶")

In the formula, you actually type the "¶" character which you will see a button for in the calculation dialog. If you are now searching for "¶2¶" in the example above, it won't be located.

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.