Jump to content

Best Way to Archive and add to a big file?


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

Recommended Posts

Hello

I have an event each week that constitutes the file I am using. The file is called registration and it interacts with several other files for lookups etc. The group used to keep the whole thing in a file and it got so big that the printing was a real time thing.

We want to get rid of the big file and just have a little file that we back up to the bigger file/

The little file will be empty at the beginning of the weekly event and then grow to 300 records of so. At the end of the event we want to make a script that will automate the merging of the little file into the archive. Any suggestions on doing this the best way with a script?

Thanks

STAN

Link to comment
Share on other sites

Hi Stan,

If your archive file matches the 'live' file in structure (same fields, same names etc), then you can simply create a script in the archive file which imports the found set from the current file using the 'matching records' option.

Then you can create a script in your current file which archives the current batch of records to get ready for a new week. Something along the lines of:

Show Message ["Are you *sure* you want to archive all the current records?" "Cancel", "Archive"]

If ["Status(CurrentMessageChoice) = 2"]

Show All Records

Perform Script [sub-scripts, External: "Archive.fp5"]

Delete All Records [No Dialog]

End If

- where the external script at step four calls the import script in the archive file.

Whenever the script is run it will leave you with an empty file ready for a new batch of records, and the previous batch will be in the archive file instead (where they will appear as the found set until the file is closed). cool.gif

Link to comment
Share on other sites

This topic is 7343 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.