Normal Topic Data Deletion Issue in a Record (Read 782 times)
Louis Galvao
Full Member
***
Offline


"Sufferin' Succatash"

Posts: 265
Location: Canada
Joined: Feb 14th, 2005
Data Deletion Issue in a Record
May 30th, 2005 at 2:43pm
Print Post Print Post  
I accidentally encountered a problem the other day whereby all the data in my record was wiped out.

This is what I did and I have been able to successfully duplicate this:

1. I was in an existing record, made a slight change to a piece of data but did not hit F10 to save it.

2. I clicked on a tab that has report buttons and selected a particular button and report (doesn't matter which button or report selected)

3. The first message indicates:  " The current record has been changed and has not been committed to the database.  Are you sure you want to close this record?"

If YES is selected, then everything is fine and the report runs.

If NO is selected, a second message appears:  "The current record has been changed and has not been committed to the database.  The operation will automatically commit the record.  Continue ?"

If YES is selected, the data in the record is completely wiped out, the report runs but shows only this record with no information.

If NO is selected, everything is fine and the report does not run.

Can you try this on a test record to determine if this is consistent on your end.

I am afraid that some users will do what I did above but not realize that they have deleted the data in the record.

Thanks,

Louis
  

Louis Galvao
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: Data Deletion Issue in a Record
Reply #1 - May 30th, 2005 at 3:05pm
Print Post Print Post  
Hello Louis,

I've tried this here on the sample schedule application and running a report before committing the current record does not erase it.

If you change a record and run a report from the command tree, don't use any of your buttons, does this still happen?

Can you post the code for your command button?

-Ray
  

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


"Sufferin' Succatash"

Posts: 265
Location: Canada
Joined: Feb 14th, 2005
Re: Data Deletion Issue in a Record
Reply #2 - May 30th, 2005 at 4:10pm
Print Post Print Post  
Ray:

When I try to make a change, don't save and run a report from the command area, the process works fine.

If I select YES, it saves the record and runs the report.

If I select NO, it does not run nor does it delete the data.

Here is a sample of my code for one of my buttons.  In all cases, my command button brings up a pop up menu.

var vMonth as String      
var vRun as Int
var vSpec as Int
var vRetrieve as String
var vTree as Int

//offer user choice of reports to print

//popup is placed directly over Print Button

PopupSelectPosition(4, @XPos(PAYROLL ADVANCES MTH), @YPos(PAYROLL ADVANCES MTH))

vMonth = @Popupmenu("01-JAN;02-FEB;03-MAR;04-APR;05-MAY;06-JUN;07-JUL;08-AUG;09-SEP;10-OC
T;11-NOV;12-DEC", "Select A Month")

If @LEN(vMonth) = 0
{
     vMonth = "JAN"
}
Else
{
     vMonth = @Right(vMonth, 3)
}
GlobalValue("Report Month", vMonth)

//LOADS RETRIEVE SPEC

vRetrieve = "01-JAN;02-FEB;03-MAR;04-APR;05-MAY;06-JUN;07-JUL;08-AUG;09-SEP;10-OCT;11-NOV;12
-DEC"


If @LEN(vRetrieve) = 0
{
     vRetrieve = "JAN"
}
Else
{
     vRetrieve = @Right(vRetrieve, 3)
}

vSpec = @LoadRetrieveSpec("PAYROLL ADVANCES - " + vMonth)
vRetrieve = @LoadSortSpec("PAYROLL ADVANCES")
vTree = @SelectTreeItem("Search Menu!Search Commands!Retrieve New Results (F10)")


vRun = @SelectTreeItem("Search Update Menu!Results Commands!Reports!Employee!Payroll Advances - Mth (Preview)")
  

Louis Galvao
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: Data Deletion Issue in a Record
Reply #3 - May 30th, 2005 at 8:42pm
Print Post Print Post  
Hello Louis,

Found and fixed.

If you put a call to @Save before the call to LoadRetrieveSpec() this will not happen.

-Ray
  

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


"Sufferin' Succatash"

Posts: 265
Location: Canada
Joined: Feb 14th, 2005
Re: Data Deletion Issue in a Record
Reply #4 - Jun 1st, 2005 at 8:46pm
Print Post Print Post  
That was simple.  Thank you.

Louis
  

Louis Galvao
Back to top
 
IP Logged