Page 1 of 1

Prevent Duplicate Entries

Posted: Sat Apr 13, 2013 11:52 pm
by Christine Stringfield

Is there a way to prevent duplicate entries in a collection?


Prevent Duplicate Entries

Posted: Sun Apr 14, 2013 3:49 am
by maxkatz

Yes, it would need to be implemented in your app logic. For example, you could check if such record already exists in the database.


Prevent Duplicate Entries

Posted: Sun Apr 14, 2013 10:18 pm
by Christine Stringfield

I thought that I might be able to invoke a query service and then if the query results were empty, then I could invoke a create service.

However, even if the query results are empty, the query is successful, so I cannot then conditionally invoke a create service if the query errors. Any other suggestions?


Prevent Duplicate Entries

Posted: Sun Apr 14, 2013 11:58 pm
by Christine Stringfield

I was able to accomplish what I needed by using some custom JavaScript and calling the create service in my JavaScript. :)