Solved

FM - Problem Importing from Table to Table via Scheduled Script

Posted on 2014-04-17
12
302 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 24

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
 
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 24

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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 24

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 24

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 24

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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

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…
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 demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

762 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now