Need to create a new data entry in another table

i’m trying to keep my inventory and sell record separated and clean.

therefore intend to have the inventory data created in the sell table after i inserted a date into the sold date.

been using grox and chatgpt to help solve this question but still cant.
it always return as “#circularReferenceError” or “#AttributeError