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

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

Recommended Posts

Posted

Here's what I'm doing:

I have a privilege set configured in a way that only allows members of that priv set to edit records when those records meet specific conditions. This is working properly.

I am allowing users who cannot edit a record at that time to still be able to enter the field so they can select and copy the text. This is working properly.

Here's what I don't like about it:

If the user tries to edit the field when their privilege set won't let them, they get FileMaker's native dialog that says "Your access privileges do not allow you to perform this action."

Here's what I'm trying to do:

I'd like to be able to trigger a script that fires before the FM native dialog that displays a more meaningful dialog (why they can't edit the record at this time) and completely suppress FM's native dialog.

I've accomplished this with a script that's triggered on keystroke that reverts the record, then shows my dialog. The only problem is that now I get a different native FM dialog "Before typing, press tab or click in a field, or choose the New Record menu command." Does anybody have any suggestions? It sure would be nice to know a way to suppress native FM dialogs that don't seem to be affected by Set Error Capture step!!

Thanks in advance.

-Kent

Posted

Update : I added a Halt Script step to the end and the last native dialog no longer displays. An Exit Script step does not have the same effect, even though my test script has no parent calling it. Can anyone explain this behavior?

Posted

An Exit Script step does not have the same effect

Have you tried it with a result of 0?

---

BTW, if your users are not allowed to edit the record, what's the point of reverting?

Posted

BTW, if your users are not allowed to edit the record, what's the point of reverting?

Hi Michael,

So they don't get the dialog "Your access privileges do not allow you to perform this action." Is there a better way to handle this? That dialog means nothing to the users. I want them to see a custom dialog that informs them why the record can't be edited at that time. Revert Record is the only way I could figure out to suppress FM's native dialog.

Posted

Login as User and try to modify the Value field.

Nice! So, why does Exit Script step with a result of "0" do this? I'd like to understand this so I might be able apply it in other situations, if applicable.

Thanks in advance!

-Kent

Posted

Exiting the script with a result of 0 (False) cancels the triggering event, i.e. the keystroke. Otherwise the keystroke would be executed immediately following the execution of the script, resulting in the very error message you are trying to prevent.

post-72594-0-50782300-1326929475_thumb.p

Posted

Exiting the script with a result of 0 (False) cancels the triggering event, i.e. the keystroke. Otherwise the keystroke would be executed immediately following the execution of the script, resulting in the very error message you are trying to prevent.

post-72594-0-50782300-1326929475_thumb.p

Terrific info, Michael, thanks! I knew I'd seen a reference to that behavior before, I just didn't realize it had been staring me right in the face :logik:

Cheers,

-Kent

This topic is 4692 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.