@giri-zano OK I DID IT YAY.
I gave up on using code to enter the data and used @giri-zano 's advice
In Wix db, every row inside a collection CAN have an owner column filled. If a Member submits data to a collection, his userId is saved in the row, in the column _owner. Go to Content Manager (you know, the database spreadsheet thing), click on Manage Fields, tick "_owner", and voila.
Then I used this code to compare the active user.id to the poster user.id
export function dataset2_ready() {
let user = wixUsers.currentUser;
let userId = user.id;
let isLoggedIn = user.loggedIn;
$w("#input3").value = $w("#text35").text;
$w.onReady(function () {
$w("#dynamicDataset").onReady(() => {
let itemFieldName = $w("#dynamicDataset").getCurrentItem()._owner;
if (user.id === itemFieldName) {
console.log("hello post creator");
} else {
console.log("you're not the post creator" + itemFieldName + " " + user.id);
}
});
});
}
THANK YOU EVERYONE FOR THE HELP