Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

If [Get ( PrivilegeSetName ) = "abc"] doesn't work


This topic is 6937 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hi eveybody, here's the problem...

I've got a script that looks something like this ...

If [Get ( PrivilegeSetName ) = "Privilege abc"],

Go to layout "abc",

If [Get ( PrivilegeSetName ) = "Privilege xyz"],

Go to layout "xyz"

It doesn't work!!!!! it just does to the default layout.

But, if I use...

If [Get ( AccountName ) = "Account abc"],

Go to layout "abc",

If [Get ( AccountName ) = "Account xyz"],

Go to layout "xyz"

it works like a charm.

Why doesn't the Get ( PrivilegeSetName ) work?

Am I doing something wrong??

Thanks in advance.

Sifter

Posted

Suggestion (May / may not work): try the following: after Go To layout <name> command, include an Exit Script command.

Frank

Posted

The obvious place to look is at your privilege sets. First try Administrator (with privilege set = "Full Access") and see if that works to go to the "Full Access" layout...

Posted

I believe I ran into this same problem myself a couple months back and ended up solving it by testing for the PatternCount rather than just testing for a straight up match.

Posted

Still no luck. This is driving me nuts.

It ONLY works with "Full Access" privilege set. I tried testing for patternCount and that also works ONLY for the "Full Access" privilege set. I've gone through this in a number of different ways step-by-step with no luck. Everything seems to be organized properly. It all works seamlessly with 'Full Access" but it's dead in the water with any other privilege set. There's got to be something I'm overlooking in terms of access. I know there's someone out there with an answer. Any suggestions???

Posted

Works fine for me.

You might try setting a global with the result of Get ( PrivilegeSetName ) to make sure it returns what you are expecting.

Posted

I tried using a calculation field that is set to return the privilege set. It returns the right privilege set name but the script still ONLY works for the "Full Access" privilege set. Any which way I try it I get the same result. Works for Full Access but for no other privilege set.

Posted

Is it possible that you have set security in such a way as that it prohibits the script from writing to your layout unless the account actually has full access? You might try checking the box that makes the script run with full privliges.

Posted

That was one of the first things I did. The script runs. If I simply change the script to validate the Account name instead of the Privilege set name, it works fine for all the Acounts (regardless of privilege set). But I need to use the privilege set to validate the users because I need to intigrate this step into various scripts and there are too many Accounts (not to mention new accounts) to keep track of. The the privilege set name is the best way for me to manage this reasonably.

Posted

Are you using Filemaker authentication or Windows authentication? Also, are you running in one single file or is your application spread across multiple files?

Posted

I just tried to replicate your problem on my system and everything worked as expected. I did however use Filemaker authentication in a single file scenario.

Another thought; if you are using Windows authentication it's possible to put a single user into more than one privlige set by having them in more than one Windows security group. If this is the case you will need to remove the user from the other security groups or or rearrange the order in which the accounts appear in the Define Accounts & Privilges dialog box. There is a sentence at the top of the dialog box indicating that authentication occurs in the order in which the accounts occur.

I'm beginning to think the problem is more security & authentication related than script logic related.

Posted

Sifter,

I switched over to Windows authentication and put the user into two Windows security groups; one with full access and one with read only access. By doing this I was able to replicate your problem.

As described above I solved it by either;

1. Removing the second security group from the user's Windows account or

2. Changing the order in which the accounts are authenticated in the Define Accounts & Privliges dialog box.

Hope this help.

Posted

Problem solved...............

The source of all my hair pulling is a tiny little check box at the bottom of the script window. I did myself in by checking it very early on in the process of writing my script thinking that I was doing a good thing because of all of the restrictions that I was going to be putting on the user accounts. That "good thing" actually did the exact opposite of what it was intended to do. I'm talking about the "Run script with full access privileges" check box. I had it checked the entire time and it prevented the script from running properly. Unchecked, it runs perfectly.

I'm thinking that there may be a conflict between the script access setting in the privileges window and the "Run script with full access privileges" setting in the script window. Both settings were set to give access to run the script...they may have cancelled each other out.

Anyhow, thanks for eveybodies input.

  • 10 months later...
Posted

Hi..

Sorry quoting from stifer

"

If [Get ( PrivilegeSetName ) = "Privilege abc"],

Go to layout "abc",

If [Get ( PrivilegeSetName ) = "Privilege xyz"],

Go to layout "xyz"

It doesn't work!!!!! it just does to the default layout.

But, if I use...

If [Get ( AccountName ) = "Account abc"],

Go to layout "abc",

If [Get ( AccountName ) = "Account xyz"],

Go to layout "xyz"

"

May i know whats the difference between Get ( PrivilegeSetName ) and Get ( AccountName )? Since get account name is working fine why need privilege set name then? sorry im still learning..

Thanks a lot..

Kelvin

This topic is 6937 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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