innodes Posted September 9, 2009 Posted September 9, 2009 Is there a script trigger that would work while entering a layout and where is it found? ie, OnLayoutEnter ? thanks,
mr_vodka Posted September 9, 2009 Posted September 9, 2009 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.
innodes Posted September 10, 2009 Author Posted September 10, 2009 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.
Fitch Posted September 10, 2009 Posted September 10, 2009 Make your script, after setting the field, commit the record with no dialog/skip validation.
innodes Posted September 10, 2009 Author Posted September 10, 2009 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
Fitch Posted September 11, 2009 Posted September 11, 2009 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.
innodes Posted September 14, 2009 Author Posted September 14, 2009 Is there a way to dynamically do the same within an If statement?
Fitch Posted September 15, 2009 Posted September 15, 2009 Yes, can you give an example of what you're after?
innodes Posted September 18, 2009 Author Posted September 18, 2009 Say I need to check a consistantly named field in multiple tables, ie. _layoutTitle If [ Not IsEmpty ( Get ( LayoutTableName ) & "::_layoutTitle" ) Would that work?
Recommended Posts
This topic is 5819 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 accountSign in
Already have an account? Sign in here.
Sign In Now