Normal Topic Program code for Mass Delete (Read 851 times)
addison1
Member
*
Offline


No personal text

Posts: 43
Joined: Aug 1st, 2004
Program code for Mass Delete
Nov 1st, 2005 at 9:46pm
Print Post Print Post  
While you all were having fun in Vegas, I was here in So Florida in a huricane. I'm sure you had a better time than I.
My last posting asked about a way to Mass Delete a group of records which were the result set of a search. I'd like to do this from program code rather than showing my user the database application tree.
The suggestion I got had to do with using a macro to do the mass delete because it would turn off the "do you want to permanantly delete x records" prompt. Well the mass delete works just fine but now I can't find a way to program an exit from the retrieve spec which generated the results set. I thought an  @SelectTreeItem specifing Exit Search Update, or something similar would work but it doesn't. 
I have electric, phones, and cable, but lack the power to get this done.
All help appreciated.
  
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Program code for Mass Delete
Reply #1 - Nov 1st, 2005 at 10:21pm
Print Post Print Post  
Use @Exit. @SelectTreeItem() can not be used to call a menu item that will close the current form.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
addison1
Member
*
Offline


No personal text

Posts: 43
Joined: Aug 1st, 2004
Re: Program code for Mass Delete
Reply #2 - Nov 2nd, 2005 at 1:34pm
Print Post Print Post  
Ray,
@exit doesn't work, that's where I started.
Perhaps I didn't fully explain. I'm in the Retrieve Spec., I look for all records from customer A with a specific condition, I get the result set, I mass delete it, but when I try to move on I'm looking at the blank  form in the update mode, I can't get that search/update tab closed.






  
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Program code for Mass Delete
Reply #3 - Nov 2nd, 2005 at 2:32pm
Print Post Print Post  
Hello,

I just tried this here with a sample app and @Exit does work. My code is attached to a command button and the code is

Code
Select All
@Macro("MassDelete.mac")
@Exit 



All the Mass Delete macro does is click the Mass Delete option on the menu tree.

Another option is to have your macro click the Exit Search/Update choice on the tree after it clicks the Mass Delete choice on the tree.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
addison1
Member
*
Offline


No personal text

Posts: 43
Joined: Aug 1st, 2004
Re: Program code for Mass Delete
Reply #4 - Nov 2nd, 2005 at 11:57pm
Print Post Print Post  
I've tried it both ways.
I'll try it again
Thanks
  
Back to top
 
IP Logged