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

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

Recommended Posts

Posted

Under Layout Setup. OnLayoutLoad if you want it to run when the layouts loads, or OnModeEnter if you want it to run when the mode changes.

Posted

John,

I am trying to eliminate the use of a calculation field by using this script trigger to set a field with (Get LayoutName) as it opens the layout. Currently the calc does this quietly in the background. The script trigger is also working, but when it sets the field, it is asking to change the record or revert. How can this be overridden. I want it to work, like a variable, that gets set, but without dialog.

Posted

Make your script, after setting the field, commit the record with no dialog/skip validation.

Posted

sorry, I should have known that. thanks

Is there a way to dynamically set field? What I mean is, to do what you helped with above on multiple tables will require multiple scripts that set the appropriate field in each. Is there a way to say:

Set Field [ Get ( LayoutTable ) & "::_layout" ; Get ( LayoutName ) ]

or even

Set Field [ Substitute ( Get ( LayoutTable ) & "::_layout" ; Get ( LayoutName ) ; "_" ; " " ) ]

or using a variable?

thanks

Posted

Yes, FileMaker 10 has Set Field By Name.

Another method is to assign an object name to the field, and the script could then use Go to Object and Set Field(don't specify the field). This method can be used in FileMaker 8.5 and 9 as well.

Posted

Yes, can you give an example of what you're after?

Posted

Say I need to check a consistantly named field in multiple tables, ie. _layoutTitle

If [ Not IsEmpty ( Get ( LayoutTableName ) & "::_layoutTitle" )

Would that work?

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