Update multiple related rows data

Hi Eveyrone, 

I have a problem cannot be solved by my tiny head as shown below: 

I have 2 tables "Relocation" and "Inventory"

JohnYuen_1-1693823803348.png

JohnYuen_2-1693823863874.png

Inventory is a database to store product data, and Relocation works as a form for me to submit and update the inventory. 

As you can see the example data of the inventory, my products happen to have multiple barcodes so i separate the products by barcodes (2 barcodes, 2 rows; 3 barcodes, 3 rows, etc.)

I created two actions as shown below: 

JohnYuen_3-1693824087694.png

full formula of the Trigger - SELECT(Inventory[Barcode], [YuensCode] = [_THISROW].[YuensCode])

JohnYuen_4-1693824115117.png

both actions run perfectly, but the headache is about the location it updated to my database if you look back to the Inventory example data... 

the "Relocation" table will definitely have lots of rows which contain old and new ones. Now i only have two rows, and in the inventory, the PrimaryLocation of "John123" turns to have both data of Relocation. 

I tested myself, the PrimaryLocation of John123 in Inventory will only append instead of replace the PrimaryLocation. 

What should i do?

What I want to do is everytime i submit a new location to update, the automation will replace the PrimaryLocation with NewPrimaryLocation for all related product (All John123's PrimaryLocation will be update to the submitted one, and will only have 1 PrimaryLocation). 

0 2 86
2 REPLIES 2

Ohne vollständig herausgefunden zu haben, was Sie wollen.

Versuchen Sie es mit "Setzen Sie diese Spalte" in der letzten Abbildung Primärer Standort = [Neuer primärer Standort].

Thanks for the reply, appreciate it. 

What i really need is to update multiple rows in inventory when submitting the form (Relocation). 

I have tried the PrimaryLocation = Relocation[NewPrimaryLocation] and it works. However, it is not replacing the old PrimaryLocation with New one, but instead it adds into the cell. 

Top Labels in this Space