December 19, 200421 yr I import a text file that contains more records than I need. I want to make a script that will delete the records I don't need before FM performs any calculations (to speed the process); but I do not find that functionality in the script steps. My script will find the unwanted records, but I can't seem to delete them through a script, but only manually, after the Find script step; and, by this point I have waited through FM performing the calculations on the unneeded records. Any suggestions, please?
December 20, 200421 yr Try the Delete All Records [ ] script step. You should use this script step with caution though. Make sure that your find was successful before proceeding with this delete.
December 20, 200421 yr Author Thanks for your suggestion. However, I have done exactly as you suggest, but the script halts when it finds the records and does not continue to the next script step, Delete All Records. I must click on the Find button for the process to continue. Then, FM does the calculations for all of the found records. After which, if I select Delete Found Records manually from the menu, FM deletes the unneeded records. Something aborts the script at the Enter Find Mode [Restore] step. Here is my Script: Enter Browse Mode Allow User Abort [On] Import Records [Restore] Enter Find Mode [Restore] Delete All Records [No Dialog] Exit Script Thanks for your help.
December 20, 200421 yr An added note to using delete all records, if you plan to migrate to FM7 I would highly recommend you always add a GoToLayout step that references the intended table before any Delete all records step. As in FM7 if you are in a different table with regards to the current layout or active window and you perform this script step, it will delete all records referenced in the current window regardless of the table you originally intended. I would be much more comfortable with FM7 delete all function if the delete all records contained a reference to the table option and also displayed this table name in the warning message. But for your Fm6 app this is not an issue. Rod
Create an account or sign in to comment