hi, Velo-Ninja!! thank you always for your help!!
velo API’s sample code of bulkSave() below (maybe any other code will do same )
let toSave1 = {
“title” : “Mr.” ,
“first_name” : “John” ,
“last_name” : “Doe”
};
let toSave2 = {
“title” : “Ms.” ,
“first_name” : “Jane” ,
“last_name” : “Doe”
};
wixData . bulkSave ( “collectionName” , [ toSave1 , toSave2 ])
. then (( results ) => {
let inserted = results . inserted ; // 2
let insertedIds = results . insertedItemIds ; // see below
let updated = results . updated ; // 0
let skipped = results . skipped ; // 0
let errors = results . errors ; // []
console.log(inserted); // 2 (this log always prints correctly but…)
})
. catch (( err ) => {
let errorMsg = err ;
});
when I reload the page, the number of items in the collection increases by 4.
why???