For security reasons, with WebDirect, exported files go to the computer's default download location, you can't change it. Similarly, you can't automatically import from a specified location - the user has to specify the file to import.
If this is completely a housekeeping task where the user doesn't really need to provide input on the files, you might want to look at Perform Script on Server and set it up to run from the Server.
1 of 1 people found this helpful
WebDirect import and export commands are evaluated via the server context, so you are probably not using server compatible logic. You should use "Perform Script on Server" to make sure that webdirect operates in the correct context.
Remember as well since browsers are sandboxed, you can't usually interact outside of the browser (EG documents folder) without user interaction to confirm.
Thank you. I tried Perform Script on Server, but it just deletes all of my Table 3 records. I don't want the user providing any input other than the button click. Do you have a small example of how this would work?
Nothing I can share, did you read the documentation I linked to and evaluate your script? You should fully try and understand this.
There are some script steps that don't work, or work differently, with Perform Script on Server.
The most important thing to consider is that Perform Script On Server has it's own context, so just because there is a record active in WebDirect, that record won't automatically be active in Perform Script On Server. You need to navigate to the correct layout and records in the Perform Script on Server script.
Can you post your script and we can advise what changes might need to be made for Perform Script on Server?
Thank you. I tried Perform Script on Server, but it just deletes all of my Table 3 records.
I will take another look at the documentation that you linked above.
I understand, but without understanding the full reasoning behind the context just changing one thing may not help.
You should share your script here as well so we can advise you on which steps specifically will break in your case.
+1! post the server logs, too, perhaps?
are the records deleted or just hidden as they are with regular imports?
but we need a little more info, please!
Where is the NIST_KPI_Pro file located? All four scripts are importing from this file, but the file path is not specified. This file will need to be available on the Server in order for the Import Records script step to work.
What do you mean by the file path is not specified? The file is hosted on our server. Even when I change the file path to fmnet, I have the same results.
Straight from the documentation I linked to:
Supporting import/export formats:
Importing/exporting directly to and from another FileMaker Pro file is not supported via a FileMaker Server scheduled script. The supported import/export formats include:
So the NIST_KPI_Pro file is located in the Server Documents folder?
See the following in the Import Records help:
"Any specified file must be in the FileMaker Server Documents folder, the temporary folder, or a child folder of either the FileMaker Server Documents folder or the temporary folder. For example, the following are all valid paths for file.csv:
OK. I will review this information more thoroughly.