Solved

FM - Problem Importing from Table to Table via Scheduled Script

Posted on 2014-04-17
12
320 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Pop up windows can be a useful feature of any Filemaker database.  Though best used sparingly, they can be employed in a multitude of different ways, for example;  as a splash screen at login, during scripted processes to control user input, as pick…
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…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

630 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