dylanls Posted October 22, 2010 Posted October 22, 2010 i have a simple questions that i cannot find an answer to despite extensive searching. I need to jump to the same record in another window. Currently i do it as follows: in windows 1: Set variable [$current; Value:Get(RecordNumber)] - in windows 2: Go to Record/Request/Page [No Dialog, $current] This however does obviously not work when the sort order of window 1 is different than windows 2 the recordnumber will be different. So i was wondering can i use recordID instead of recordNumber? How can i use the Go To Record function using a RecordID? Thanks in advance for your help!
TheTominator Posted October 22, 2010 Posted October 22, 2010 Without using a relationship and a newly spawned window or a reliable mapping of the sort order in one window to the sort order in another, you probably have to loop over the records in the second window and stop when you get to the target record.
dylanls Posted October 22, 2010 Author Posted October 22, 2010 (edited) Thanks for your immediate response. Although i feared this is not the neatest solution, it does work! Despite the loop, when using freeze window its not visible what the script is doing and it finds the related record in a fraction of a second. Thanks again! for those interested: in windows 1: Set variable [$current; Value:Get(RecordID)] in windows 2: freeze window Go to Record/Request/First If Get(RecordID) ≠ $current Loop Go to Record/Request/Next Exit Loop if Get(RecordID) = $current end loop end if Edited October 22, 2010 by Guest
Raybaudi Posted October 22, 2010 Posted October 22, 2010 Hi you'll need a Show All Records script step ( or an "Exit after Last" into the Go to Record/Request/Next ) at the beginning of your script. If the $current is omitted, you'll go into an infinite loop.
dylanls Posted October 22, 2010 Author Posted October 22, 2010 (edited) Hi Daniele, I didnt post all of the script, there is a show all records in it. (both actually, also an exit after last) You are absolutely right though - it could eternally loop without it! Edited October 22, 2010 by Guest
Recommended Posts
This topic is 5144 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now