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.

startup script problem

Featured Replies

I use a script to create a backup file for test purposes. It inserts the words Test Copy at the beginning of the file name for easy identification. For example: Test Copy Clients.fp7.

A startup script runs when the file opens. It tests the FileName and sets a global for display purposes:

Set Variable[$filename; Value:Get (FileName)]

If [LeftWords($filename;2)=”Test Copy”]

SetField[issues::gTestCopyAlert; “TEST COPY”]

Else

SetField[issues::gTestCopyAlert;””]

End if

If the words Test Copy appear in FileName, gTestCopyAlert displays the words TEST COPY on the layout.

The problem is that when I create the test file and open it for the first time gTestCopyAlert is not being set. It remains empty. I must close the file and re-open it for gTestCopyAlert is set properly. It then displays properly on subsequent opens. In other words, I have to run the startup script twice before it works

Edited by Guest

Just a wild guess here but is it possible that the storage of the global field isn't actually set to global?

I just built a small file and tried your script and it works as expected. My guess is that you have done what I often do myself and just made a simple mistake. Double check the simple stuff and I bet you find the problem there.

  • Author

Just a clarification. I notice if I run the startup script a second time, the script works!!! :B :

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.