Insert if no record exists else update on server using Azure Mobile Services

You can use a server side table script to check if a record exists before completing the insert. Here is a example script that checks if any item in the table has a matching userId value and if so doesn’t do the insert.

The above script checks the People table for a record with the same userId and if it exists then a new record is not inserted. The existing record is updated.

For more details on getting started with Azure mobile services refer to this tutorial.

Vivek Maskara

I am pursuing BTech in Software Engineering from Delhi Technological University. I develop apps, create websites and blog about my app experiences.

Read more:
How to create your first Windows Phone app
How to change the App name and Tile name of your Windows phone app
Data binding in Windows Phone app – One way binding
Close