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.

Script Running on Server doesn’t see Records of External FM Data Source

Featured Replies

FMS17: In my Import.fmp12 database, I have specified an external FileMaker database file:Main.fmp12 and added a couple of table occurrences to this file (with the same names as in Main.fmp12) and added the corresponding layouts.

When I open Import.fmp12 from a client, I can see and work with all records of the Main.fmp12 file, just fine. From the client, I can also run any script just fine.

However, when I run the same script as a scheduled script from the server (only with server compatible script steps, of course) the script runs, but I can’t see any record !

Here are some script steps that I use:

     Go to Layout [ “Kontakt” (Kontakt) ]

     Show All Records

     Set Variable [ $id_Käuferbetrieb ; Value:  Let ( [ ~fmsql_execute = True ; ~query = "  SELECT id FROM Kontakt WHERE Betriebsnummer = ?  " ; ~columnSeparator = Tab ; ~rowSeparator = ¶ ; ~result = … ]

And this is what I get:

(Import is a local table and a local layout)

LayoutName: Import

RecordCount/FoundCount: 1324/30

LastError: 0

(Kontakt is a local layout with data from a remote table of an external data source from Main.fmp12, with TO «Kontakt»)

LayoutName: Kontakt

RecordCount/FoundCount: 0/0

fmsqlresult: ?

LastError: 0

I’m puzzled — Any idea what’s wrong?

Thanks a lot for any help!

Gary

  • Author

OK, I have found the problem:

The account that I use in FMS to execute the script was not defined in both files, but only in one. Makes sense.

So, in order to be able to access data in an external data source, the same account which FMS uses to execute the script needs to be present in both files.

Create an account or sign in to comment

Similar Content

Important Information

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

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.