veganboyjosh Posted May 1, 2003 Posted May 1, 2003 or: "how many buzzwords can i get into a subject heading?" i'm trying to write a script that when you "delete" a record (thru a scripted button, _not_ thru the records menu), it exports it to another file. this way, we can "delete" records, and still access them later if we need to, but not look at them all the time. (we enter all our phone calls from potential customers, and need to keep track of who's called. the customers who never call back i'd like to keep track of for advertising purposes, and in case they call back, i can show that they called, etc.) anyway, the way i'd like to do it is have a detel record button on the main layout, and when you click that button, it runs the script "export/delete file" which takes the user to a layout that is a duplicate of the current layout, but all the fields are inactive/locked. there is also a false message box (one i've created to resemble the message box fmp gives you) and asks for the reason for the deletion. once this reason field is entered, the ok button is clicked, and the script (or a new one) continues. it isolates the current "deleted" record, and exports it to a copy db, for future/archival use. does anyone have any suggestions/ potential problems with this? are there easier ways to do any of these? it seems pretty straight fwd. thanks.
danjacoby Posted May 1, 2003 Posted May 1, 2003 Excellent! Start with: Show All Records Omit Record Show Omitted The export is actually an import performed from the archival database (you get to use the "Perform Script [External Script]" function), and then put the "Delete Records" script step in -- it will only delete the found set, which in this case consists of one record (BTW, the import into the archive DB will only import the found set as well). I have used a slightly different version of this, with a checkbox field so that the client can "archive" a bunch of records at one fell swoop, but the concept is the same.
Lee Smith Posted May 1, 2003 Posted May 1, 2003 Check out a file called "Purge.FP3" by ISO Productions http://www.fmfiles.com/tnt10.html I think that this does what you want to do. HTH Lee
veganboyjosh Posted May 1, 2003 Author Posted May 1, 2003 i played around with it for about 5 minutes, and thought i had to create a "transitional" db for the recrods to export to, and then import them into the destination/archive/clone db, only to realize that i could just/would have to import them directly. thanks for the tips. this will definitely save us some scrolling thru useless records. josh
Recommended Posts
This topic is 7878 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