Hot Topic (More than 10 Replies) XLR not using correct number (Read 2006 times)
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
XLR not using correct number
Jul 2nd, 2004 at 2:14pm
Print Post Print Post  
reference:  This has been carried over as a new item from an earlier posting by me at: http://www.lantica.com/Forum2/cgi-bin/yabb/YaBB.pl?board=gen_disc;action=display... , subject = Elements not saving data.
=====================================
Using the following programing as reference:

Quote:
IF @ISBLANK(Record) THEN {
     Record = @TN(@XLOOKUPR(@FN,999999,"frmName!Record","Record")) + 1
     }


If there are 10 records in the database, then each one has a unique record number, 1-10.  If I add a new record, it will become record number 11.  (Do not actually add the record, just confirm what the value will be).

However, if I delete records, 6-10 first, then I only have 5 records, each with its unique record number 1-5.  If I now add a new record, it will become record number 11.  But I really expect it to become record value = 6.  This should not be happening.

Sesame seems to be working as if these records were never deleted.  The XLR command seems to be looking at deleted records.  Are records actually being deleted, or are they just being tagged internally as deleted?  Is there a process that needs to be done after "deleting" records to have them really fully deleted?

I have confirmed this in two forms in two different databases.
« Last Edit: Jul 2nd, 2004 at 5:01pm by Bob_Hansen »  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: XLR not using correct number
Reply #1 - Jul 2nd, 2004 at 2:20pm
Print Post Print Post  
Records are not actually physically deleted until the next time you load the application, however, they should not be getting picked up by this type of command either. Thanks for the good clue! I'll go check the filtering and let you know what I find.

Does the problem resolve itself if you close and reopen the application?
  

- 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: XLR not using correct number
Reply #2 - Jul 2nd, 2004 at 2:37pm
Print Post Print Post  
Yes, it does appear to be corrected if I close the Application and then Open it again.    Sounds like an easy fix at your end.....(always easy when its someone else's problem)
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: XLR not using correct number
Reply #3 - Jul 2nd, 2004 at 2:46pm
Print Post Print Post  
Bob,

I'm not seeing this happening. When I delete records, the @XLR adjusts itself correctly. I believe that you are seeing it, but it may be tied to a particular sequence of events.

Could you give me some more information as to the order in which things are happening, especially as far as the deleting of the records? Are there subforms involved? Switching between modes? Anything special like that?
  

- 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: XLR not using correct number
Reply #4 - Jul 2nd, 2004 at 2:56pm
Print Post Print Post  
I was sure you would see this......aaarrgh!
This is in the application that needed the hot fix for fields added with Field Manager. 

Let me try a few more things.  I will keep copies of existing files in case you want them later.

I will delete all records in DB, make a new DSR from the empty DB, Save as new Application, and try to do this again.

Stay tuned.....
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: XLR not using correct number
Reply #5 - Jul 2nd, 2004 at 3:02pm
Print Post Print Post  
I'm not seeing it in practical testing, or in the code itself. I'm not saying that it's not happening to you, only that it may require a particular set of circumstances to cause it.

After you make your dsr from the db, check Field Manager. The big telltale for the hotfix issue is that a reconcile either makes fields disappear, or shows multiple fields with the same name and type.

This doesn't actually sound related, but one never knows. An extra Record field may still be lurking.  Smiley
  

- 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: XLR not using correct number
Reply #6 - Jul 2nd, 2004 at 3:43pm
Print Post Print Post  
New symptoms......file is on the way to support@lantica.com
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: XLR not using correct number
Reply #7 - Jul 2nd, 2004 at 4:12pm
Print Post Print Post  
Quote:
New symptoms......file is on the way to support@lantica.com


OK. What happened to the old symptoms? Are they gone now?
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: XLR not using correct number
Reply #8 - Jul 2nd, 2004 at 4:18pm
Print Post Print Post  
Bob,

Your current problem is that the record number continues to increment when pressing F9, even though the record number is no longer blank. I believe that the problem is your conditional. You say:

IF @ISNEW OR @ADD OR @ISBLANK(Record)

Pressing F9 does not change your being in Add mode. @ADD will return True and this programming will run.

  

- 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: XLR not using correct number
Reply #9 - Jul 2nd, 2004 at 4:26pm
Print Post Print Post  
Sorry, forgot to pull that out, Erika.   

Form with problem is frmParts.  That formula will alse need to pull out @Add.  That done, do you see problem with referencing "deleted"records before reloading?  Need to run, be gone for a few hours.........thanks for help.....
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: XLR not using correct number
Reply #10 - Jul 2nd, 2004 at 4:35pm
Print Post Print Post  
I apologize. I see the reference to frmParts in your email now.

No, I don't see the delete problem. I suspect that, while stepping back and forth to check your values, you may have been incrementing them, causing you to get a higher number than you expected.

Also, I recommend using AND instead of OR in this case.
IF @ISNEW AND @ISBLANK(Record)

Deleting records at the end of a stack in Add mode can temporarily trigger @IsNew and may increment your already filled in record number.
  

- 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: XLR not using correct number
Reply #11 - Jul 6th, 2004 at 12:41am
Print Post Print Post  
I ended up rebuilding the two databases and forms from scratch over the weekend. 

The XLR now seems to be working, and all the field values are being saved.  Thanks for the help.  Call this item CLOSED
  



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