Mirroring records from one portal to another
I never got to the bottom of a previous post: Portals: Mirroring
In this I have the following relationships:
I want to prescribe a DrugList_rx. When I add a new 'Input' I want to automatically generate/mirror this list in 'Druglist_in' where I can specify the actual input as opposed to what had been prescribed.
It was suggested to try:
Set Variable [ $ID; Value:Patient::Prescription_n ]
Go to Layout [ “Input” (Input) ]
Set Field [ Input::_PrescriptionID; $ID ]
Set Variable [ $List; Value:Druglist_rx::__DrugList_rxID ]
Go to Layout [ “Druglist_rx” (Druglist_rx) ]
Set Variable [ $K; Value:ValueCount ( $K+1 ) ]
Exit Loop If [ $K>ValueCount ( $List ) ]
Set Field [ Druglist_in; GetValue ( List (Druglist_rx::__DrugList_rxID) ; $K) ]
Go to Layout [ “L_Patient Copy” (Patient) ]
Its fine till: Go to Layout [ “Druglist_rx” (Druglist_rx) ]
then gets stuck in the loop generating endless Feedlist_rx records.