Got it, thanks - am I saving correctly to session in the following?:
let toInsert = {
postcode : $w("#pcinput").value
};
wixData.insert("mydataset", toInsert)
.then( (results) => {
console.log(results._id);
session.setItem("sessionid", results._id);
} )
.catch( (err) => {
let errorMsg = err;
} );