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

Get(WindowMode) has undocumented Layout mode value

Featured Replies

FM8 Help describes four return values from the Get(WindowMode) function: 0 (Browse), 1 (Find), 2 (Preview) and 3 (printing).

The Description goes on to say "If a script using this function runs while the file is in Layout mode, FileMaker Pro switches to Browse mode and returns 0."

I found this while searching for a way to disable an auto-entry calculation in Layout mode. On a whim, I opened the Data Viewer tool in Layout mode and discovered that Get(WindowMode) returns a 4 -- just what I need!

That's interesting how you got the "4" when you used the function in the Data Viewer while in Layout mode.

What do you mean by "disable an auto-entry calculation in Layout mode"?

  • Author

What do you mean by "disable an auto-entry calculation in Layout mode"?

I have an invisible layout field that detects a record change using an auto-entry calculation. Tonight I enhanced this calculation using the EventScript plug-in to automatically change the current layout based on another field.

I got that working fine in Browse mode. But when I returned to Layout mode to make some adjustments, the "onRecordChange" auto-entry calculation got triggered when I changed from one layout to the next. EventScript then triggered my layout syncing script, which changed back to Browse mode.

I'm now using Get(WindowMode) to disable layout switching in Layout mode.

The EventScript plug-in is available from Softwares for Humans.

But when I returned to Layout mode to make some adjustments, the "onRecordChange" auto-entry calculation got triggered when I changed from one layout to the next. EventScript then triggered my layout syncing script, which changed back to Browse mode.

I didn't realize EventScript would do that in Layout Mode. That's interesting to know...Thanks!

Create an account or sign in to comment

Important Information

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

Account

Navigation

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.