August 21, 200421 yr Newbies When I run this script it only paste the last thing copied to the clip board in the field (Prevs Pymt). It does paste it where the (RSRVN#) are matching. But I can't make the script copy the correct numbers from Old Data. I have tried changing all the different boxes in the relationships menu and it didn't help. Example Script New Payments & Reservations Go to Layout [ "Data" (Unearned Rent Data) ] Go to Record/Request/Page [ First ] Go to Field [ Unearned Rent Data::RSRVN# ] Loop If [ Unearned Rent Data::RSRVN# ? Old Data::RSRVN# ] Go to Record/Request/Page [ Next ] Else If [ Unearned Rent Data::RSRVN# = Old Data::RSRVN# ] Go to Field [ Old Data::COH ] Paste [ Unearned Rent Data::Prevs Pymt ] [ Select ] Copy [ Old Data::COH ] [ Select ] Go to Record/Request/Page [ Next; Exit after last ] End If End Loop I am stuck and I have limited script writing skills Thanks rick
August 21, 200421 yr Author Newbies Fixed my problem here is the script that works! Go to Layout [ "Data" (Unearned Rent Data) ] Go to Record/Request/Page [ First ] Go to Field [ Unearned Rent Data::RSRVN# ] Loop If [ Unearned Rent Data::RSRVN# ? Old Data::RSRVN# ] Go to Record/Request/Page [ Next ] Else If [ Unearned Rent Data::RSRVN# = Old Data::RSRVN# ] Go to Related Record [ From table: "Old Data"; Using layout: "Old Data" (Old Data) ] Go to Field [ Old Data::COH ] Copy [ Old Data::COH ] [ Select ] Go to Related Record [ From table: "Unearned Rent Data"; Using layout: "Data" (Unearned Rent Data) ] Paste [ Unearned Rent Data::Prevs Pymt ] [ Select ] Go to Record/Request/Page [ Next; Exit after last ] End If End Loop Thanks
August 22, 200421 yr It is generally better to avoid copy/paste in scripts and use set field instead. Something like this should work better: Go to Layout [ "Data" (Unearned Rent Data) ] Go to Record/Request/Page [ First ] Loop If [ Unearned Rent Data::RSRVN# = Old Data::RSRVN# ] set field [Prevs Pymt , Old Data::COH ] End If Go to Record/Request/Page [ Next; Exit after last ] End Loop
Create an account or sign in to comment