Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 3381 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I have FileMaker Server running on Windows. A batch file on that machine creates a JSON file daily. I'm writing a script to bring the contents of that file into FileMaker so I can parse it. The script I'm working with is very simple:

    Go to Layout [ “GLB” (GLB) ]

    Set Field [ GLB::error ; Get ( LastError ) ] 

    Insert from URL [ Select ; No dialog ; GLB::companies_json ; "file:///C:\Program Files\FileMaker\FileMaker Server\Data\Documents\companies.json" ] 

    Set Field [ GLB::error ; List (   GLB::error ;   Get ( LastError ) ) ] 

The `Set Field` steps are only there to report the errors generated.

So I have this script and it's set up as a disabled scheduled script on the server. I have double and triple checked that the file exists at the given path. But every time I run it on the server using the `Run a Schedule Now` menu item the `GLB::error` field has `0¶100`, indicating that the `Insert from URL` step returned an error that the file is missing.

Any assistance would be greatly appreciated.

Posted

Wim, that tip about using the browser worked great. I opened the file with Explorer, but it didn't show the protocol string (file:/). I added that just to make sure the file loaded again, and used that in the script. BTW, the format was "file:/C:\...", so one slash after the protocol and backslashes between the directories.

This topic is 3381 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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