ignotum Posted April 26 Posted April 26 I'm having trouble getting a scripted import to work. I have 2 files hosted on the same server and I want to import from one to the other (all records in the table). The script works when I run it from the file I'm importing into that I have open locally against the hosted file but when I run it as a Server Scheduled script it fails to do the import part. (It DOES the truncates just fine!) Set Variable $sourcepath = "file:/HostName/Filename" ("file:/MyHostingProvider.cloud/FileImportingFromName") Go to Layout [the appropriate layout] Truncate Table [ dialog off; ,Current Table>] Import Records [dialog off; appropriate table; $sourcepath] What am I doing wrong? mark
comment Posted April 26 Posted April 26 AFAIK (I am not really an expert on this) it's not possible to import directly from one hosted file to another. The Import Records script step in a server-side script can access only files located in the server's Documents or temporary folder: https://help.claris.com/en/pro-help/content/paths-in-server-side-scripts.html Quote Important: In order to import/export to another FileMaker Pro file via a FileMaker Server scheduled script, the script would need to export the records from the FileMaker Pro file to one of the below valid paths and then import the records from this file into the other FileMaker Pro file. https://support.claris.com/s/article/Import-Export-script-on-FileMaker-Server-1503692951014?language=en_US Note also the limitation on supported file formats.
ignotum Posted April 26 Author Posted April 26 That's what I was afraid of. I only went down this path because a vendor tech support person suggested that the import from one to the other was the solution to an issue I was having... but maybe they neglected to provide the full details to how they were saying it should be implemented.
comment Posted April 26 Posted April 26 1 hour ago, ignotum said: a vendor tech support person suggested that the import from one to the other was the solution to an issue I was having... Maybe it would be better to start with that issue? As it is, it looks like another example of an XY problem. In any case, you certainly can import data from one hosted file to another, if necessary. You just cannot do it directly.
ignotum Posted April 26 Author Posted April 26 The other "issue" is not directly related to the import issue... To be transparent: I'm using MirrorSync and have a hub and spoke file hosted on the same server. The task to achieve is to regularly repopulate, via a script schedule, the spoke file with all of the data from the hub file. It appears that the general idea is solid but the specific implementation was not discussed. The direct import is what I took away from the call with 360works... it seems there is more to the story.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now