Normal Topic Unique Entries (Read 1084 times)
Alchemist
Member
*
Offline


No personal text

Posts: 8
Joined: Feb 5th, 2004
Unique Entries
Feb 13th, 2004 at 4:42pm
Print Post Print Post  
Q&A had a feature that alerted data entry that a duplicate PIN had been entered. Is that feature available in Sesame. I guessing - NO because there are no index fields/elements.

Should I just write some code to lookup the PIN entry in the file?

One other question is there an equivalent to "setfocus" in SBasic?
  
Back to top
 
IP Logged
 
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Re: Unique Entries
Reply #1 - Feb 13th, 2004 at 6:49pm
Print Post Print Post  
You just have to write a code to prevent duplicate entry for data integrity. Would you please tell us what does setfocus command do and what are you trying to do?
  
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Unique Entries
Reply #2 - Feb 13th, 2004 at 7:00pm
Print Post Print Post  
Sesame 1.0.1 does have the ThrowFocus command. It places user keyboard focus (the "cursor") on the layout element specified as an argument to the command.
  

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


No personal text

Posts: 8
Joined: Feb 5th, 2004
Re: Unique Entries
Reply #3 - Feb 14th, 2004 at 1:28am
Print Post Print Post  
Bharat - In regard to write a code would you suggest using xlookup? Also in regards to "SetFocus". See Mark's explaination of ThrowFocus.

Mark - Thanks I'll give ThrowFocus a try.

Also thanks to both of you on the xlookup speed suggestions. Both of your suggestions helped.
  
Back to top
 
IP Logged
 
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Re: Unique Entries
Reply #4 - Feb 14th, 2004 at 2:25am
Print Post Print Post  
I use following to prevent duplicate entry.

I want RecNumber to be Unique

RecNumber:

============
Code in RecNumber On Element Exit Event

If @IsNew and @xlookup ( @filename, RecNumber, "RecNumber", "RecNumber") = RecNumber then  
{
 @msgbox ("Record Exists","", "")
 Notifyform(1)
 goto RecNumber
}

This will prevent duplicate record from being saved and also gives warning.

How do you propose to use Throwfocus ( ) command to use for this purpose?
« Last Edit: Feb 14th, 2004 at 7:00am by Bharat_Naik »  
Back to top
 
IP Logged
 
Alchemist
Member
*
Offline


No personal text

Posts: 8
Joined: Feb 5th, 2004
Re: Unique Entries
Reply #5 - Feb 16th, 2004 at 3:45pm
Print Post Print Post  
I've started a new topic ThrowFocus. Because it not quite working the way I thought it would.
  
Back to top
 
IP Logged