Normal Topic @Number (Read 616 times)
NICEBERG
Full Member
Members
***
Offline


I came, I saw, I'm still
trying to figure it out!

Posts: 208
Location: Green Bay, WI
Joined: Dec 17th, 2003
@Number
Sep 25th, 2009 at 6:42pm
Print Post Print Post  
I've changed some programming to use @number instead of the line that is "//'d" out.

If Equip >0 then
{
 if @add then
{
 if @IsBlank(Rec_No0) then Rec_No0 = @number
 if @IsBlank(Entered) then Entered = @date
 PO = @Str(@left(Equip,4) + @mid(Equip,6,2) + "-" +Rec_No0)

}
}

This is what I had been using but was getting too many duplicates and opted to lose a few numbers instead.
//@ToNumber(@XLR(@Fn, 99999999, "Rec_No0", "Rec_No0")) +1
//the above is the old programming for rec_no0
 
Surprisingly, I'm getting duplicate record numbers at times since making this change. At one stretch, 9 out of 10 record numbers were duplicated since the above change. We are running client-server.

An additional piece of info, at times when I log in as admin I see that our main computer is often logged in twice in Sesame Server. I think this may be from people not quitting the program correctly and have asked everyone to use File-Exit from now on. There is also a "Save and Exit" command button programmed to take them out safely.

Any ideas on how I can be getting duplicate numbers?

Thank you,
Fred
  
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: @Number
Reply #1 - Sep 25th, 2009 at 7:02pm
Print Post Print Post  
Use GlobalValue instead of @number or XLookupR. It will allow you as many numbers as you want and the code is less complicated.

As to logged in clients - what version of Sesame are you using?
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
NICEBERG
Full Member
Members
***
Offline


I came, I saw, I'm still
trying to figure it out!

Posts: 208
Location: Green Bay, WI
Joined: Dec 17th, 2003
Re: @Number
Reply #2 - Sep 25th, 2009 at 7:08pm
Print Post Print Post  
Thanks for the tip on GlobalValue.

Ver 1.1.5  Cry   Someday we'll get there!
  
Back to top
 
IP Logged