Solved

FM - Problem Importing from Table to Table via Scheduled Script

Posted on 2014-04-17
12
310 Views
Last Modified: 2014-04-21
I am having problems with a scheduled script with the script step of importing (adding records) from table to table.  It works when I manually run it, but does not import via a schedule.  I know imports from tab delimited files work, table to table imports should work as well, shouldn't they?  See screen print attached.  (Note, I did put all the script steps into the main script and this did not help either.)
-Capture.JPG
0
Comment
Question by:rvfowler2
  • 7
  • 5
12 Comments
 
LVL 25

Expert Comment

by:Will Loving
ID: 40007291
How is it failing? Are you getting records but no data, no records or what? If you use:

Error Capture [On]
Import Records [ ]
Set Field [ SomeGlobalField_g ; List( Get ( LastError ) ; SomeGlobalField_g]

you should have a global field that accumulates any error that is occurring when the scheduled script runs.

What I don't see is the Import Path as specified under "Specify Data Source". Your script steps should include:

Set Variable [ $FilePath ; Get ( FilePath ) ]

to determine the path of the current file and then place the $FilePath variable in the path dialog.
0
 
LVL 2

Author Comment

by:rvfowler2
ID: 40007301
No records at all.  Oh, shoot, that's right.  I think when run from the server, it doesn't connect via remote file sharing the same way it does from the client.
0
 
LVL 2

Author Comment

by:rvfowler2
ID: 40007315
Get ( FilePath ) find the path to the table.  OK, thanks.
0
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 
LVL 2

Author Comment

by:rvfowler2
ID: 40007329
No, still doesn't work from a schedule, but does work manually.  It won't import records (add them) from the TNTALERTS table/layout to the TNT_ALERTS_BACK table/layout.  However, all other script steps work.
0
 
LVL 25

Expert Comment

by:Will Loving
ID: 40007380
Capture the error code and see what the issue is. Import Records should work with Server-side scripting but there may be special considerations regarding specifying the FilePath
0
 
LVL 2

Author Comment

by:rvfowler2
ID: 40009082
Error code is 100 file not found.  You do have a different file path for Scheduled Scripts, but the format I usually use is not working.  See below:

file:/C:/Program Files/FileMaker/FileMaker Server/Data/Databases/Vacancy.fmp12
0
 
LVL 25

Expert Comment

by:Will Loving
ID: 40009107
0
 
LVL 2

Author Comment

by:rvfowler2
ID: 40009115
I just was about to post the same.  It doesn't actually because it explains that FM doesn't import "from another FileMaker Pro file," but says nothing about table to table within the same file.  I've posted this on Filemaker's site, but I'm almost sure they will say that the same applies.
0
 
LVL 25

Accepted Solution

by:
Will Loving earned 500 total points
ID: 40009219
As the documentation says:
Any specified file must be in the Documents folder, the temporary folder, or a child folder of either the Documents folder or the temporary folder. For example, the following are all valid paths for file.csv:
So why not do an export followed by an import to any of the allowed locations?
0
 
LVL 2

Author Closing Comment

by:rvfowler2
ID: 40009234
Thanks Will, I already thought of that option.  Yes, it does say imports are only from the Documents folder, but then that automatically excludes any FM file, which makes no sense at all.  FM designed their database import feature so that it cannot be imported directly from table to table?   All they have to do is make the database folder one of the allowed options just like the Documents folder is.  I doubt they have, but just in case, I posted a ticket on their website just to be sure.
0
 
LVL 25

Expert Comment

by:Will Loving
ID: 40009253
There are limitations to what server and can including the above location restrictions. There may be a work around but I've not seen it yet.
0
 
LVL 2

Author Comment

by:rvfowler2
ID: 40012848
Additional Note:  Other than importing table to table, the other issue is that we were using the wrong Documents folder.  Sometime when we upgraded FM Server, it changed the Document file path from D to C.
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Conversion Steps for merging and consolidating separate Filemaker files The following is a step-by-step guide for the process of consolidating two or more FileMaker files (version 7 and later) into a single file with multiple tables. Sometimes th…
Having just upgraded from Filemaker 11 to Filemaker 12 over the weekend, we thought we would add some tips for others making the same move.  In general, our installation went without incident. Please note that this is not a replacement for Chapter 5…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question