Hi everyone, I’m still here for an explanation.
I have a collection with these fields:
“dataEvento” type Date
“tipoEvento” type Drop Down
“nomeEventoOErimonia” type text
“code” type text
“utenteRedirect” type Drop Down
“redirect” type Url
“attivo” type boolean
Through a button I want to update only one field, and the others leave them unchanged. This is my code
let index = null;
let idRows = null;
let AttivoRows = null;
let NameRows = null;
export function TabEventi_rowSelect(event) {
index = event.rowIndex;
idRows = event.target.rows[index]._id;
AttivoRows = event.rowData.attivo;
}
export function serviceActivate_click() {
let toSave = {
“_id”: idRows,
“attivo”: AttivoRows
};
wixData.save("RedirectCerimonie", toSave)
.catch( (err) => {
let errorMsg = err;
console.log(errorMsg);
});
}
What happens after the command is started. The field that I want to update is updated, the problem is that the other fields are deleted and appears in consolelog this:
Wix code SDK Warning: This is a text that can not be set to null or undefined.
Who can help me?
Thank you