Normal Topic Checking unique values (Read 837 times)
chaven
Member
*
Offline


There's no way out of
here...

Posts: 18
Joined: Apr 2nd, 2013
Checking unique values
Jun 7th, 2013 at 6:37pm
Print Post Print Post  
I have an application built that allows HR to enter employee information, along with any training they have received.  I created a sub-form that links the employee to each record of training by their unique employee ID number. 

When HR decides they want to add a NEW employee in ADD DATA Mode:  How can I add a check that will look at all ID's registered and not allow the same one to be used again.  I know the logic, but not sure about which of the plethora of functions that may make this easier to accomplish.  Originally I thought of using one of the "X" functions with "On element exit" to search on the value entered, and compare it with the values queried.  Any ideas?

-=K=-
  

...when you come in, you're in, for good.
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: Checking unique values
Reply #1 - Jun 10th, 2013 at 5:42pm
Print Post Print Post  
You can use the basic @XLookup() command to see if there is a record already in the database with that ID. If you have the @XLookup() return the value from the ID element that you are also searching on, you know that if it returns a value, it found a matching record.

-Ray
  

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


There's no way out of
here...

Posts: 18
Joined: Apr 2nd, 2013
Re: Checking unique values
Reply #2 - Jun 12th, 2013 at 2:26pm
Print Post Print Post  
Thanks Ray,

I have been swamped this week and my Sesame project has been put on the back-burner for now.  I'll post the result as soon as I have time to implement.

-=K=-
  

...when you come in, you're in, for good.
Back to top
 
IP Logged