chansdad
Posts: 0
Joined: Wed Nov 20, 2013 7:40 pm

creating a record only when it is not in the database using create service and query service of the database

how to creating record only if the record does not exist . What is the best approach ? I have a db , and using the create service to create the record - this works .
I have been trying to use database query service to query for the record and then call the create service only if the query returned has no records.
db query service always returns a success , just that the rows returned is empty or zero so cannot really use this for creating a record only when record does not exist .
Any suggestions? or perhaps an example would be helpful on how to use db create service to create a record only when a record does not exist .

Thanks

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

creating a record only when it is not in the database using create service and query service of the database

You got the right approach. Check first if particular object exists. If no, the do a request that will create it.

chansdad
Posts: 0
Joined: Wed Nov 20, 2013 7:40 pm

creating a record only when it is not in the database using create service and query service of the database

never mind , was able to get it to work .. I guess I have to get used to the appery style of wiring the logic.

Return to “Issues”