Solved

FM - Problem Importing from Table to Table via Scheduled Script

Posted on 2014-04-17
12
308 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Problem: You have a hosted FileMaker database and users are tired of having to use Open Remote or Open Recent to access the database. They say, "can't you just give us something to double-click on rather than have to go through those dialogs?" An…
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 tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

862 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

23 Experts available now in Live!

Get 1:1 Help Now