August 20, 201510 yr 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.
August 21, 201510 yr I think if you use the "file" protocol you definitely have to use forward slashes: http://www.filemaker.com/help/13/fmp/en/html/create_db.8.42.html.
August 21, 201510 yr Agreed with Agnes; select that file with your browser to see how the path should look like.
August 21, 201510 yr Author 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.
Create an account or sign in to comment