Problem with 2 portals
I need your help on a quite strange problem with 2 portals in one layout.
I have a layout named "Inventory" , in which there are 2 protals: "Item" and "SelectedItemPrice" (a duplicated occurrence of "Price").
the portal "Item" stores the items in inventory. the portal "SelectedItemPrice" gives different prices for selected item. The relationship and layout attached.
I have 2 items, Item1 (price 11 and 12) and Item 2 (price 21 and 22).
In the portal "Item", there is a button that select the item and check the prices in the portal "SelectedItemPrice" (Script: Set Field[Inventory::SelectedItem; Item::ID], Commit Records/requests [No dialog]).
This part works fine. No problem. The problem comes from the 2nd portal, "SelectedItemPrice".
in this protal, there is also a button, which is supposed to pass the price to the selected item.
script: Set Field [Item::Price; SelectedItemPrice::Price] Commit Records/requests [No dialog]
Here comes the problem. This button indeed passes the price. HOWEVER, it always passes the price to the first item, regardless which Item is selected.
You can see from the attached screen shot, the price 21 (price for Item2) is set on Item1, while Item2 is selected (highlighted item ID )