Is there a way to prevent duplicate entries in a collection?
Is there a way to prevent duplicate entries in a collection?
Yes, it would need to be implemented in your app logic. For example, you could check if such record already exists in the database.
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?
I was able to accomplish what I needed by using some custom JavaScript and calling the create service in my JavaScript. ![]()