Normal Topic Unique user input field (Read 1164 times)
Whites Boots
Member
*
Offline



Posts: 2
Joined: Jul 18th, 2011
Unique user input field
Jul 18th, 2011 at 3:11pm
Print Post Print Post  
Is it possible (and if so, how) to create a field that the user can input any information they want, but have the field be unique across all records in the database?  We need to add a field for a purchase order number that comes from the customer to our database but we do not want to be able to reuse a purchase order number.  
  
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Unique user input field
Reply #1 - Jul 18th, 2011 at 4:24pm
Print Post Print Post  
There are a couple of ways to do this. You can go into SDesigner and set the Read Only property to Unique. If you want finer control over the behavior, you can use the @IsUnique function in SBasic.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Whites Boots
Member
*
Offline



Posts: 2
Joined: Jul 18th, 2011
Re: Unique user input field
Reply #2 - Jul 18th, 2011 at 4:37pm
Print Post Print Post  
Yes.  Thank you.  I had seen the @IsUnique in the programming guide but for some reason it did not look like exactly what I wanted.  But apparently it is.  Thank you very much.
  
Back to top
 
IP Logged