TKnTexas Posted July 26, 2009 Posted July 26, 2009 I want to create a runtime to use in WinXP. I have created other runtimes, one I have been using successfully for 2yrs. That one relied on data keyed. This one will be strictly populated with records imported from files created by our accounting system. It is an older system, lacking very little in the way of querying information regarding disbursements. When we write AP checks, the check registers are printed to spool files, real-time for each check run. Spool files are named "apckrgMMDDYY.sp". Since they are spooled reports, all of the lines of a report are there, multiple occurrences of the page headers, blank lines, etc. Since the check date is in the header, it must be added to each record. I have formatted the application so there is a folder for the application and a folder for the import files: /sparta/apckrg /sparta/downloads Within the database there are two tables:IMPORT and FINAL. I do the clean up work in IMPORT table and move results to the FINAL table for reports. I am scripting in small steps for easy testing. The only steps giving me problems are with IMPORTing. I really want this to be seamlessly done. I have yet to get this running on my development machine which is MacBook Pro running Leopard, FMP10 Advanced. Having just deleted all records in IMPORT, I am in the correct table. I prompt for a check register date, storing the result in a global. Using Set Variable script set I format the date into the filename. In the IMPORT step I set the file type to ALL. I note that the path as: file:/sparta/download I get the message that the filename is not found and I am in the folder /sparta/apckrg, not the download. If I navigate manually to the correct folder and import, the script completes correctly. When the script completes I am left with the data finalized and in the correct found set. I move to the FINAL table (via goto layout). I want to import the final records. It is not working either.
bcooney Posted July 26, 2009 Posted July 26, 2009 What is a "apckrgMMDDYY.sp" file? Can you manually import this file? Can you post the script? What do you see in the data viewer as your $importPath?
IdealData Posted July 27, 2009 Posted July 27, 2009 file:/sparta/download This is wrong. If you are using relative path addressing then the path spec is file: (there is no "/"). Relative path addressing is typically for .fp7 files Absolute path addressing is filemac:/ or filewin:/
TKnTexas Posted July 30, 2009 Author Posted July 30, 2009 The files are not anything more than writing a report to a DOS-text file. It has an *ap ending as do all of the spooled reports coming out of A/P. It can be opened by any text editor, Word or Excel. It is not delimited in any form or fashion. Using string functions I break out the data to the components I need.
TKnTexas Posted July 30, 2009 Author Posted July 30, 2009 After reading your response on RELATIVE and ABSOLUTE I had a little better understanding. I realize I will have to work with it more to truly grasp it. However, I moved the DOWNLOAD folder inside of the APCkReg folder. I made the reference to it relative and it worked. Thank you very much.
igservices Posted August 21, 2009 Posted August 21, 2009 Thomas, Addressing your table to table import: Import records from the open file specifying the source table and the target table, set the fields to match and you are off. It works brilliantly for me (if I may say so). You might use the "fmnet://.fp7" file designation since you have the file open and that way it isn't looking for a file in some specific place should you move it.
Recommended Posts
This topic is 5572 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now