Newbies Braeburn Boy Posted February 24, 2009 Newbies Posted February 24, 2009 I have a database file PAYROLL with multiple tables - two of which are TIMECARDS and PAYCHECKS and i have created a reusable script that will check to see if the tables window is open and either go to it or if there isn't one open then create a new window and then goto it and open the LAYOUT in the scriptname I am posting it because you can save a LOT of time - reuse it for any FILE and LAYOUT by just changing the script name since the script actually USES the name to find the window and go to the named layout. the only other thing that you want to change of course is the NEW WINDOW script step - just add your custom window size an location this one just uses a space dash space " - " as a separator but you could use any separator if it is also changed in the script steps the script name has the format DATABASENAME - LAYOUTNAME If [ PatternCount (WindowNames (Left(Get ( ScriptName );Position ( Get ( ScriptName ) ; " - " ; 1 ; 1 )-1)) ; Get ( ScriptName ) ) ] Select Window [ Name: Get ( ScriptName ); Current file ] Go to Layout [ Right ( Get ( ScriptName ) ; Length ( Get ( ScriptName ) )-Position ( Get ( ScriptName ) ;" - " ; 1 ; 1 )-2) ] Show/Hide Status Area [ Lock; Hide ] Else New Window [ Name: Get ( ScriptName ); Height: 720; Width: 985; Top: 15; Left: 15 ] Go to Layout [ Right ( Get ( ScriptName ) ; Length ( Get ( ScriptName ) )-Position ( Get ( ScriptName ) ;" - " ; 1 ; 1 )-2) ] Show/Hide Status Area [ Lock; Hide ] End If
Newbies Braeburn Boy Posted February 24, 2009 Author Newbies Posted February 24, 2009 Now that I donated that - can anyone tell me how to use it AND the go to related record script to go from one table window (PAYCHECKS) to the other (TIMECARDS) - i have a one-to-one relationship between TIMECARDS and PAYCHECKS via the "same timecard ID" field and i want to click on the timecard ID in PAYCHECKS window to goto the related TIMECARD in the TIMECARD table/window i have tried using a $$variable in the script to pass the record number - Get(record number) - of the related record works great if you do a FIND ALL RECORDS first in the related table then a go to record number $$variable but a sort will change the landing record i could use a find and find the related key field (timecardID) but then why not just use the goto related record script? which of course i can't get to work once the target window changes to the related table i'm going to this seems so simple but i can't find a simple solution - i like reusable ones any ideas would be appreciated greatly
Recommended Posts
This topic is 5752 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