Page 1 of 1

Unique Database index Field

Posted: Sat Jan 18, 2014 8:05 pm
by Willie Sims

How can you stop duplicates in the Database? I know that I would need both a server side script but I am at a total loss as to how to go about it?


Unique Database index Field

Posted: Sun Jan 19, 2014 12:01 am
by Alena Prykhodko

Hello Willie,

Please tell us in more detail what exactly you would like to do? Please tell us in more detail what exactly you would like to do? Post a screen shot. What index fields are duplicated?


Unique Database index Field

Posted: Sun Jan 19, 2014 1:51 am
by Willie Sims

Hello, I have a Database with Truck Numbers in it I am trying to insure that no duplicate truck numbers are entered into the database. But there is no way to set the data field at Unique


Unique Database index Field

Posted: Mon Jan 20, 2014 6:57 am
by Kateryna Grynko

Hi Willie,

You would need to create a service for reading this data. If there is no such record - add it.


Unique Database index Field

Posted: Thu Jul 31, 2014 2:04 pm
by Shawn

Trying to do the same .... how do I know if there are no records ?

Do I assume if the query succeeds it means there are records and failure means record is not present ?


Unique Database index Field

Posted: Thu Jul 31, 2014 5:19 pm
by Kateryna Grynko

Hi Shawn,

You can check a length of service response on service Success event. If it equals 0, then nothing is found:preif (data.length === 0){
alert("not found");
}/pre


Unique Database index Field

Posted: Fri Aug 01, 2014 10:41 am
by Shawn

that worked. thanks katya !