What does this mean?
and what caused it?
Code:
import wixData from 'wix-data'
let userId;
let loginEmail;
$w.onReady(function () {
});
export function submitButton_click(event) {
let inputEmail = $w("#input1".value)
console.log("Getting ID for " , inputEmail)
wixData.query("Members/PrivateMembersData")
.eq(loginEmail,$w("#input1".value) )
.find()
.then((res) => {
userId=res._id
loginEmail=res.loginEmail
console.log(userId)
console.log(loginEmail)
$w("#wixLogin").text = res.loginEmail
$w("#wixID").text = res.wixEmail
})
}
Oops.. This s embarrassing, I should know better. Thats definitely a Rookie error! Just fiddling around with trying to grab a users ID in order to better understand how the email users functions work.
Made the change but still returns error:
"WDE0048: Invalid .eq field value [Undefined]. .eq field must be a String."
Thanks
JD
Hello
See below. Also, what are you trying to achieve? you seem to be getting the login email just to return the same email?
let inputEmail = $w("#input1".value)
Needs to be
let inputEmail = $w("#input1").value
.eq(loginEmail,$w("#input1".value) )
Needs to be
.eq("loginEmail", $w("#input1").value)