ok we are getting there. a problem with this line wixData.query(“TextData”) though
import wixUsers from ‘wix-users’;
import wixData from ‘wix-data’;
$w.onReady( () => {
$w(“#dataset5”).onReady( () => {
$w(“#dataset5”).revert()
.then( () => {
console.log(“Done reverting the item”);
} )
. catch ( (err) => {
let errMsg = err;
} );
} );
} );
wixData.query(“TextData”)
.eq(“id”. userId)
.limit(1)
.find()
.then( (results) => {
let firstItem = results.items[0];
} )
. catch ( (err) => { let errorMsg = err; } );
Thanks Adam