Hi,
I would like to get a query from the database which contains my email id and I want to get the reporting manager which is there in “entitlement” database and put it in a input text and using dataset I want to update IN “availed” database. I went through the wixdata.query article I was able to make it in the table but I need it in a input text field
import wixData from ‘wix-data’;
import wixUsers from ‘wix-users’;
$w.onReady(function () {
let user = wixUsers.currentUser;
user.getEmail()
.then((email) => {
let userEmail = email; // "user@something.com"
$w("#email").value = "" + userEmail;
});
});
export function searchButton_click(event, $w) {
$w(‘#leaveapplication’).show();
wixData.query(‘LM_Entitlement’)
.contains(‘email’, $w(‘#email’).value)
.find()
.then(res => {
let items = res.items;
// UNABLE TO MOVE FROM HERE. I AM GETTING THE OBJECT. CAN’T FIND OUT HOW TO RETRIEVE THAT PARTICULAR ROW FIELD CALLED “RM_EMAIL” AND DISPLAY IT IN THE INPUT TEXT//
});
}
HELP ME OUT