September 9, 200916 yr Is there a script trigger that would work while entering a layout and where is it found? ie, OnLayoutEnter ? thanks,
September 9, 200916 yr 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.
September 10, 200916 yr Author 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.
September 10, 200916 yr Make your script, after setting the field, commit the record with no dialog/skip validation.
September 10, 200916 yr Author 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
September 11, 200916 yr 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.
September 18, 200916 yr Author Say I need to check a consistantly named field in multiple tables, ie. _layoutTitle If [ Not IsEmpty ( Get ( LayoutTableName ) & "::_layoutTitle" ) Would that work?
Create an account or sign in to comment