Lookup from another table depending on selection and calculate in enter in same row

Tabe1-Product_details… columns- product,weight
Table2- transact…columns-product,weight,calcqty,Qty,date
table1 has product names and weight of 1 qty
table2 -using ref and partof… in form view…user selects products, enters weight ,calcqty=lookup([Product],“prod_details”,“product”,“weight”) in app formula (tried in initial value also)
if keeps saving 0…i thk it saves before user selection.
i tried copying the lookup example in appsheet… Lookup Table
it works but when i add columns to it and regenerate… it stops.

You’re using LOOKUP() wrong.

See also: