Normal Topic DATA IS DISAPPEARING (Read 1442 times)
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
DATA IS DISAPPEARING
Mar 15th, 2005 at 7:41am
Print Post Print Post  
I have been noticing that records that were fully completed and saved are now missing data.

Several records are missing the address, phone number, mail name and other information.  It is very scary. 

The only thing I can think of is that perhaps there is a "flaw" in one of my programmed elements .... and that, somehow, it is being executed when it shouldn't be.

I have a layout element which reflects a person's 'status.'  This tells me whether I have complete information on them and that they are alive and well, etc. etc.  - or - that information is missing - or - that they are deceased (in which case, their previous address, phone #, etc. is no longer needed).

When I change a record from 'complete' status to 'deceased,' I use the following code (in the layout element Status - on element exit) to update the record:

Code
Select All
if Status = "Deceased" and
	Company Name > "" or
	Street Address > "" or
	Apt > "" or
	City >"" or
	State > "" or
	Zip >"" or
	EMail Address >"" or
	Home >"" or
	CommentsHome >"" or
	Cell >"" or
	CommentsCell >"" or
	Work >"" or
	CommentsWork >"" or
	Fax >"" or
	CommentsFax >"" or
	Other1 >"" or
	CommentsOther1 >"" or
	Other2 >"" or
	CommentsOther2 >"" or
	Mail Name >""then
{
	Company Name = ""
	Street Address = ""
	Apt = ""
	City = ""
	State = ""
	Zip = ""
	EMail Address = ""
	Home = ""
	CommentsHome = ""
	Cell = ""
	CommentsCell = ""
	Work = ""
	CommentsWork = ""
	Fax = ""
	CommentsFax = ""
	Other1 = ""
	CommentsOther1 = ""
	Other2 = ""
	CommentsOther2 = ""
	Mail Name = ""
	goto Date Notified0
	}
 



I noticed that on the records missing information, it only occurs in these fields (again, even though their status is not shown as 'deceased.'

It is disastrous for me to lose data once correctly entered, so I'm hoping that someone has an idea what might be causing it.

Thanks!
  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: DATA IS DISAPPEARING
Reply #1 - Mar 15th, 2005 at 1:19pm
Print Post Print Post  
Spencer,

I see a couple of problems.

1. I'm not sure how predictable it is to check for >"". Use
Not @IsBlank(Company)

2. You don't have any parentheses. Without them, your ors and ands may not be applied as you think. It's hard for me to correct this for you because I don't know what you intend any more than Sesame does.

If (A and B) or C
is not the same as
If A and (B or C)

If you just say:
If A and B or C
...you leave it to the computer to guess what you mean and it may not guess the same way you did.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: DATA IS DISAPPEARING
Reply #2 - Mar 15th, 2005 at 3:22pm
Print Post Print Post  
After you have resolved the AND/OR construction, then {
You might also want to use

Code
Select All
CLEAR(Company Name, Street Address, Apt, City, ..... CommentsOther2, Mail Name) 

No logical advantage, just shorter, and fewer chances for typing errors.

  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Re: DATA IS DISAPPEARING
Reply #3 - Mar 15th, 2005 at 4:28pm
Print Post Print Post  
GRRRR -

I was just in the middle of writing a very lengthy reply - was just about finished - and must have accidently exited from the web-site.  So, without trying to 'justify' WHEN, WHAT, WHY or HOW I came up with that ludicrous programming, (other than to say that in my eagerness to enjoy the results, I probably did it when I was SUPER tired and as soon as I converted my database .. from my memory of Q&A .. knowing that there was a better way that I could always change to later on), here is the bottom line.  

All I wanted is that - when notified that a person was deceased - to have Sesame clear a whole bunch of fields.  (Whether the fields previously contained data or not, therefore, is totally irrelevant).

I have left the "goto" portion of the programming in 'on element exit' and placed my revised programming in 'on element change' since most people only die once.  Smiley  (By funny coincidence Bob, I had just completed the programming before I saw your reply and, yes, I do believe there IS a logical advantage).  The new code is very simply:

Code
Select All
if Status = "Deceased"

then

clear (Company Name, Street Address, Apt, City, State, Zip, EMail Address, Home, CommentsHome, Cell, CommentsCell, Work, CommentsWork, Fax, CommentsFax, Other1, CommentsOther1, Other2, CommentsOther2, Mail Name) 



I trust that, now, what I wanted to accomplish is much clearer (both to Sesame AND Erika).  lol

I thought the previous programming was safe because the IF portion started with the fact that the status had to be deceased AND one of the OR conditions had to exist.  I can see now that because so MANY OR conditions followed the AND, perhaps Sesame couldn't properly interpret it.

Time will tell whether this will rectify my DISAPPEARING DATA issue.  

Thanks folks!
  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: DATA IS DISAPPEARING
Reply #4 - Mar 15th, 2005 at 4:39pm
Print Post Print Post  
Just to hit one of my pet harpstrings again:
If you must force users around your Form, get in the habit of using ThrowFocus() instead GoTo. GoTo is only supported for Q&A compatibility.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Re: DATA IS DISAPPEARING
Reply #5 - Mar 15th, 2005 at 4:50pm
Print Post Print Post  
Erika -

You are ABSOLUTELY right - so thanks for 'harping.'  I have already changed the programming replacing GoTo() with ThrowFocus(), and tested it and it works just fine.

Also, because of your earlier reply, I can see clearly that Sesame almost certainly was interpreting my earlier code to (If status = deceased AND Company Name> "") OR ....... and then if ANY of the OR conditions were met .... cleared the fields.

I am confident now that my disappearing data will stay put once I put it back in.

Thank you.  Thank you!!!
  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged