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

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

Recommended Posts

Posted

Hi,

I'm trying to make a field act like a "enabled/disabled" under a certain condition. The problem is using the onObjectEnter trigger is not working or there is something I missed.

Even if the script returns false, the object gets the focus.

Here is my script


Freeze Window

Set Variable [$typeAdd; Value: 5]

if [rep_ADDENDAS::fkTypeID = $typeAdd]

   Exit Script [Result: True]

else

   Exit Script [Result: False]

End If

BTW, the script is triggered from a portal field.

Thanks for any help.

Posted

Ok

I'm using a workaround by adding a "Go to next field" in the "else" block, but I don't like this code.

Is there a better way?

Posted

Ok

I'm using a workaround by adding a "Go to next field" in the "else" block, but I don't like this code.

Is there a better way?

No. Why don't you like it? That is NOT a "workaround". It is taking control, using the logic you have decided on.

Posted

Well you know, in my opinion everything named "Go to" sounds pretty odd.

The use of "goto" in the programming world is almost prohibited :).

Posted

I don't see how you would program a user interface without using 'go to'. User presses tab, expecting to move to the next field in tab order - how do you move the focus if not by 'go to'?

That said, I agree that the solution is not perfect - but until Filemaker allows us to put more conditions in 'Allow field to be entered', the options are rather limited.

Posted

it's true that we are quite limited.

I wonder how FM manage to keep going at this pace compared to other database system.

A lot of FM developpers are getting old and there is not much new FM enthusiast...

Anyway that's another story!

thanks for helping

  • 4 weeks later...

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