Long ago there was a thread, very similar to your problem…
https://www.wix.com/corvid/forum/community-discussion/keep-switch-on-until-switched-back-by-member/p-1/dl-5ef0a5425de91a0017455aed-5ef079bbf0d26200170de110-1?commentId=5ef079bbf0d26200170de110&origin=notification&postId=5ef01016e0dae4004ab6c2e1&replyId=5ef0a5425de91a0017455aed
But i would recommend you another solution, by using the “save”-API-function for example…
import wixData from 'wix-data';
let toSave = {"test1": true};
wixData.save("contactForm", toSave)
.then( (results) => {
let items = results.items;
console.log(items)
} )
.catch( (err) => {
let errorMsg = err;
} );
The adventage of this solution is, that you do not need any datasets
You could perhaps also use “insert”-API-function…
Or the “update”-API-function…