"After reading from different threads, it seems that Filemaker won't recognise the specified File if it is the same for both tables (the current DB file the script is running from)."
No, this is not correct. Most likely, the path to the file is not being specified correctly. Check the Manage > External Data Sources dialog and make sure the file in question is specified as file:filename (as opposed to, for example, C:\Users\etc., etc.).
What I'm trying to do is check a table against another within the same database
That's a no-go.
An FMS scheduled script can not import from a FM file. The standard approach is to export to a non-FM format (CSV, TXT,...) and then do an import.
Duh. Forgot about that. Thanks, Wim.
Thanks to you both for your replies,
The problem is definetely not with the specified path as it is the current file, so by using
$file="file:" & get(filename)
and specifying as the source for the import
filewin:/C:/Program Files (x86)/FileMaker/FileMaker Server/Data/Databases/mydb
I'm pretty much covered.
I actually use it in several other scheduled script which technically import from a FM file but into an occurence of an ODBC table in the same database, so I guess that's different...
In the meantime, I tried the alternative method oif using a text file and it seem to be working. So I guess Wim's answer is correct.
If I can ask for a bit more of your time, can you be more specific about the difference between what I'm doing successfully in the example above (import FM table -> FM ODBC occurence) and what I wanted to do there (import FM table -> FM table) and why the latter is not possible, or redirect me to the relevant knowledge article.
Again, thank you both for your input.
Have a good day,
Short answer: Wim is correct because imports from one FM file to another are not supported on server-side scripting.
Well, I'm sorry Mike, but that's not an answer, thats just repeating the same thing.
I'd like to know what are the underlying technological limitations and/or logical choices that lead to this limitation.
Also, I can't seem to find anything about it in the Filemaker help for the Import Records script step (http://www.filemaker.com/help/html/scripts_ref1.36.68.html).
It just states :•••
So if anybody's got further knowledge/ressources about that, I'd be delighted to learn and understand more about this issue.
1 of 1 people found this helpful
I'm sorry, Nils, but that is the answer. Importing from one FileMaker database to another (even the same file) is not supported server-side. This knowledge base article may be more to your liking.
Thanks again to you both for your help and yout quick replies.