May 12, 200619 yr 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.
May 12, 200619 yr 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: 1¶ 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