Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7281 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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?

Posted

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.

Posted

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.

Posted

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

This topic is 7281 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.