AnsweredAssumed Answered

Mirroring records from one portal to another

Question asked by tays01s on Jun 25, 2014
Latest reply on Jun 26, 2014 by philmodjunk

Title

Mirroring records from one portal to another

Post

I never got to the bottom of a previous post: Portals: Mirroring


      

In this I have the following relationships:

Drugs----<Druglist_rx>-----Prescriptions-----<Input----<Druglist_in>---Drugs|Input


      

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 ]

Freeze Window

Go to Layout [ “Input” (Input) ]

New Record/Request

Set Field [ Input::_PrescriptionID; $ID ]

Set Variable [ $List; Value:Druglist_rx::__DrugList_rxID ]

Go to Layout [ “Druglist_rx” (Druglist_rx) ]

Freeze Window

Loop

Set Variable [ $K; Value:ValueCount ( $K+1 ) ]

Exit Loop If [ $K>ValueCount ( $List ) ]

New Record/Request

Set Field [ Druglist_in; GetValue ( List (Druglist_rx::__DrugList_rxID) ; $K) ]

End Loop

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.

Outcomes