How to link PrivateMembersData database to another database?

What do you want to return ? the Score?

Something like this querys the database 1 on the last name (Assuming its unique) and finds the related score in the other database and returns it to a score box on your page from there you can submit it wherever you like.

wixData.query(“MyFoods”)
.eq(“Database1”,$w(‘#Lastname’).value) //This is your pages element box that contains users last name
.find()
.then( (results) => {
let items = results.items;
let item = items[0];
let Score = item.Score;
$w(‘#yourscoreelementboxname’).value = item.Score.toString();
console.log(Score);
} )
. catch ( (err) => {
let errorMsg = err;
console.log(errorMsg);
})
}