Rich S Posted May 15, 2010 Posted May 15, 2010 Please refer to the attached, in particular the highlighted area. What I want to do is enable users to delete all records (without using the Delete All Records command in the Records menu) but leave at least one record remaining in the table/layout so they won't panic when they see all the fields have disappeared for some strange reason after deleting all their found records. Therein lies the problem: as scripted, all the records will be deleted in the found set--save one--but that's no good since you want to delete all the records in the found set but retain the records _not_ in the found set. ...and, if you have only one record left in the table, found set or not, the user shouldn't be allowed to delete it. If I could get some guidance here I'd appreciate it. One possibility for an answer is that if FoundCount=0 after all records have been deleted then a new (blank) record would be generated in the next script step...but that would only work if the found set consists of all records. ARRRGGGGH! TIA for your help! Rich
comment Posted May 15, 2010 Posted May 15, 2010 Are you familiar with the Get (TotalRecordCount) function?
Rich S Posted May 15, 2010 Author Posted May 15, 2010 *BLUSH* Now I am. Thanks. I've attached a revised version of the script for others' edification. As an aside, I was going to entitle the Custom Dialog window with "DELETE REQUEST ABORTED" but on second thought changed it to "DELETE REQUEST CANCELED", instead, because some people may find the word, abort, offensive...the same people who get upset when little Johnny or Jane come home with their test marked up in red pencil or ink because red supposedly denotes anger or hostility. I tell ya, being a politically-sensitive developer is...well...I'll be good and will step off my soapbox now.
comment Posted May 16, 2010 Posted May 16, 2010 some people may find the word, abort, offensive... LOL, this reminds me of someone who objected to the terms "master" and "slave" when referring to synchronizing two clocks.
Recommended Posts
This topic is 5306 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