Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

onLayoutEnter ?

Featured Replies

Is there a script trigger that would work while entering a layout and where is it found?

ie, OnLayoutEnter ?

thanks,

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.

  • Author

thanks

  • 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.

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

  • 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

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.

  • Author

Thanks,

  • Author

Is there a way to dynamically do the same within an If statement?

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

  • 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

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.