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.

Generic Script, Tab Panels, Freeze Window

Featured Replies

If my goal is to write a script which will create a record in a table, and my goal is to also make this script as generic as possible (so it can be called from any layout/table), here is what I used to do:

(Assume FM8)


MakeARecordInTableX(id)

  Set Variable $id = Get(ScriptParameter)

  Freeze Window // to prevent flashing

  Go to layout (TableX)

  New record/request

  Set Field (key = $id)

  commit records

  go to layout (original layout)

end script

Now, this works great. this script can be called from anywhere in the solution, no matter what layout/record you are on, and it returns you to the same place you left off.

The problem is, that under FM8, if you started on a tab panel, when this script exits you might be left on the wrong tab.

One work-around is to start and end the script with "New Window" and "Close Window" steps. This seems to fix the tab panel problem, but even if you put in a "Freeze Window" step, you still get a big blank window flashing on screen.

I know I could do this using relationships and the SetField command, but that requires that you know what table you are looking at, which make the script be no longer generic.

Has anyone solved this problem?

Edited by Guest
formatting

I had this same problem. You can add a Go To Field script step that will go to a field that is only on that tab.

  • Author

To use a 'go to field' step, wouldn't you have to know ahead of time which tab you are on, so that when you exit the script you can choose the right tab?

Note: I claimed earlier that bracketing your script with "new window" / "close window" commands would prevent the tab panel from switching, but i appear to be wrong about that, at least in some preliminary testing.

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.