AnsweredAssumed Answered

Best Practice??

Question asked by TKnTexas on Jul 1, 2009
Latest reply on Jul 2, 2009 by philmodjunk


Best Practice??


I have a file with 2 tables.  In AP when we generate the check register we spool it to a text file.  We want to evaluate the discounts earned vs taken on each check run.  In the first table I import the file, each text row to one field of the record.  Using text functions I have successfully been able to parse the data out to the proper fields.  The spooled files are named by the check date, ie apckrgMMDDYY.ap.  I want to prompt for the check date to a global field.  I created the file name. 


In Table 1, it is a scratch table, nothing permanent is stored.  I want to truly automate the processes. 

1) Delete all records in the scratch file.

2) Prompt for check date.

3) import file to scratch file, fill in check date to all records.  

4) Find data records, blank rows and multple page header rows get imported.

5) Move data records to permanent table.


I have made a bunch of subroutines that could be tested separately.  Deleting the old records, works great.  Prompt for date works great. I go to a layout in the scratch file, where there are no records.  When I import, the records go to the permanent table.  I added steps to add a blank record to the scratch file after I go to the layout.  I go to the field for the import to start.  Then I do the import.  Then it works.  Is it really necessary to add the blank record and set the cursor to a field before the import will work? 


I have really learned a lot doing this little project. I would appreciate any comments.