Normal Topic @IsUnique (Read 516 times)
Calibrate1
Member
*
Offline



Posts: 38
Location: Dayton, OH
Joined: Jun 28th, 2006
@IsUnique
Jul 6th, 2007 at 3:31pm
Print Post Print Post  
I am having an issue with @IsUnique, and I don't know where I am going wrong.  I have a "Work Order No" field named "WO_No ".  This is a text field that I am trying to see if a new entry will not flag someone that the entry could be a duplicate number.  Here is my programming.

var vwo as string
var vunique as int

vwo = WO_No
vunique = @IsUnique(WO_No, vwo)

writeln(vwo)
writeln(vunique)

If vunique = 0
{
        @MsgBox("This work order number already exits, please insure this number is correct", "", "")
}

Then I go and test the syntax, nothing comes up.  So I Preview the application.  I have a few work order numbers as "1111". "1234" and  "4321".  So I enter a new record, enter "1111" in the "WO_No" field and a writeln window pops up and says:

1111
1

A "1" keeps popping up no matter what number is already in there.    Am I doing this correctly? :'(
  
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: @IsUnique
Reply #1 - Jul 6th, 2007 at 3:45pm
Print Post Print Post  
Hello,

Your code is correct. I renamed the Key element in the samples Application to be WO_No and tested it and it works perfectly.

Are you sure that a record with the work order number of 1111 already exists in the DSR file, and not only in the DB file?

-Ray
  

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



Posts: 38
Location: Dayton, OH
Joined: Jun 28th, 2006
Re: @IsUnique
Reply #2 - Jul 6th, 2007 at 3:49pm
Print Post Print Post  
I added those work order numbers in preview.  Everytime I went to preview, it had those work order numbers in that field.
  
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: @IsUnique
Reply #3 - Jul 6th, 2007 at 5:08pm
Print Post Print Post  
If you can, send the DSR and DDT files into support@lantica.com and we will have a look at it here.

-Ray
  

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