Skip to content

Upsert Multiple Objects


This operation creates and/or updates multiple objects in the database. The operation receives a collection of objects as the argument. For every object in the collection it checks if an object already exists in the database and in that case updates it with the property values in the object. Otherwise, the object is saved in the database. To check if an object exists in the database, Backendless uses the value of the objectId property.



Argument                Description
`` Required parameter. objects to upsert.

Return Value

An array of the objectId values of updated or inserted objects.


The example below upserts two objects in the "Person" data table.

Codeless Reference



Argument                Description
table name Name of the data table where the operation inserts and/or updates objects.
objects A list of objects to update or create.
return upserted objectIds When this box is checked, the operation returns a list of objectId values of updated or inserted objects.

Returns a list containing objectId values of updated or inserted objects.

Consider the following records in the Person data table:


The example below updates two objects in the Person data table:


The output will look as shown below after the Codeless logic runs. Values in the "age" and "email" columns were modified.


The operation returns the array of objectId values: