I’m very new to Corvid but a long-time programmer.
I’m using wixData.Insert to insert a row into a data collection. For some reason, the insert is adding undefined fields of the same name as existing fields, rather than inserting the values into the defined fields.
Example:
The collection contains the field Name .
const toInsert = {
‘_id’: userId,
‘Name’: userName
};
// add the item to the collection
wixData.insert(“MyTable”, toInsert)
.catch( (err) => {
console.log(err);
} );
This executes but instead of assigning the value of userName to the existing column “Name”, Corvid creates a new column called [Name] that is undefined and otherwise inserts a blank row. I’m pretty sure the permissions on the table are correct. I have tried several of the fields in the table with the same result: a new, undefined column is created.
I’m stumped!