@jeremyallen552 A couple things are catching my eye.
-
The filtering condition is on a field that, by its name, does not seem like it’s a date field. If it is, fine. If not, using the Wix built-in _createdDate would probably suit your purposes.
-
The update function does not include the _id field, so it does not know what record to update. What I would do is simply assign the status as “Inactive” in the item object itself and have that be the object that the update function uses.
oldListings.forEach(item => {
item.status = "Inactive"
wixData.update(“DATABASENAME", item);
})