insert and update depending on if the user has submitted information before

Thanks for the help. Would you be able to explain in a little more detail about the record id in your toUpdate object. (New to code and don’t entirely know what you mean)

I’m planning on adding something like this so it doesn’t get overwritten:

wixData.get("Properties", $w('#id').text)
 .then((result) => {
            result.title = $w('#input2').value
            result.agentEmail = $w('#input3').value

It will populate all of the inputs and allow them to change the information they need to.