Workflow to change value in a different table

I have 2 tables: “Inventory” and “Location History”. When I create an entry in the “Location History” table containing [Key], [ItemRef] (ref column to the “Inventory” table), [UserEmail], [TimeStamp] and [New Location]. I need a workflow to change the value of Inventory[Current Location] to the value of Location History[New Location].

I somehow succeeded but it set the value to the [Key] Column which is a UniqueID() field. I see the label [New Location] on the app, but I can’t filter the “Inventory” rows by [Current Location] and export it to a pdf.

I tried with a virtual column in the “Inventory” table with the MAXROW expression that match the [ItemID] with [ItemRef] and it works and I see the Location History[New Location] value in the app. However, when I try to extract the data to a template using the virtual column with a SELECT expression, it doesn’t work. I think it takes the [Key] which is a uniqueID() instead of the Ref value it refers to.

There must be an easier way but I can’t figure it out…

What actions and their expressions are involved in your workflow?