Craig Taylor Posted December 21, 2004 Posted December 21, 2004 I want to use a pop up window to enter into find mode and then perform a find but view it in the original window. Is this possible. Thanks Craig
CobaltSky Posted December 21, 2004 Posted December 21, 2004 Hi Craig, Yes, it's possible. There are a couple of options. You coudl script the find so that it captures the criteria, transfers them to the original windnow and performs the find there. Or alternatively, you coudl perform the find in the pop-up window, then use the Go to Related Record[ ] command to transfer the found set between the two windows. If the layouts in the two windows are based on the same Table Occurrence, then there is no relationship between them as such, and the GTRR step will instead transfer the found set across to the target window and layout.
Craig Taylor Posted December 21, 2004 Author Posted December 21, 2004 Thanks for that, they are based on the same table occurrence. So I will try the Go to Related Record Craig
Mikelevich Posted February 15, 2005 Posted February 15, 2005 To Cobaltsky not sure if Craig was able to get your advice on GTRR mathod to work - but I couldn't! Tried various combos but just couldn't make it work. I have pop-up window from one table - want to get found set in PUW to end up in original window (same table). Script New window (size etc) enter find(pause) perform find close window GTRR (from Table 'xx' to layout 'yy' in Table 'xx') Obviously I'm missing something basic - and critical! Any help gratefully recieved thanks Michael
-Queue- Posted February 15, 2005 Posted February 15, 2005 You're closing the window before the GTRR step, so it has no effect on the newly found set.
CobaltSky Posted February 15, 2005 Posted February 15, 2005 Queue wrote: You're closing the window before the GTRR step, so it has no effect on the newly found set. What he said...
Mikelevich Posted February 15, 2005 Posted February 15, 2005 thanks for the reply Sorry - that was a typo - the GTRR scripts step was BEFORE the close window..... but it still doesn't work.
CobaltSky Posted February 15, 2005 Posted February 15, 2005 Even if the 'close window' step comes after the GTRR, it will still nullify the preceding process, because the results of the GTRR (if any) will be in the window that is being closed and will be lost with its closure. If you want the results of the procedure to appear in the original window, you will need to capture the results (eg keys of the found records) and then go back to the original window and perform the GTRR there.
Mikelevich Posted February 15, 2005 Posted February 15, 2005 Here's the actual script: (The table is 'Events' and all layouts are within this table) New Window (name "search window" height etc...) Go to Layout "Search" (from table 'Events") Enter Find mode (pause) Perform Find () Go To Related Record (from table "Events"; Using layout 'List events' (Events)) ((show only related records) not selected) Close Window (current window) Go to layout ("List Events' (Events)) Exit script What am I doing wrong? thanks again Michael
Mikelevich Posted February 15, 2005 Posted February 15, 2005 Ah.... I wrote all that before getting your last reply. What you say sounds logical - I'll give it a go. Wouls you have a suggestion as to the simplest method of capturing the records? I thought my script was too breathtakingly simple to be true! -) thanks again Michael
CobaltSky Posted February 15, 2005 Posted February 15, 2005 Well, there are a few options. One of them would be to capture the size, location and name of the existing window before bringing up the new window (eg pass them to the script as a script parameter, or store them in global fields etc), then, target your GTRR at a new window, specifying the same size and location as the original window, then finally, close the original (as well as the find window). That way there would be no need to worry about capturing the found set to 'transfer' it back to the original window.
the Otter Posted February 15, 2005 Posted February 15, 2005 One of them would be to capture the size, location and name of the existing window before bringing up the new window (eg pass them to the script as a script parameter, or store them in global fields etc), then, target your GTRR at a new window, specifying the same size and location as the original window, then finally, close the original (as well as the find window).This is similar to what I
Mikelevich Posted February 15, 2005 Posted February 15, 2005 To CobaltSky and The Otter thanks for all that - I like the lateral approach of not using the GTRR at all - but I'll experiment with both. That was a great help. thanks again cheers Michael
Mikelevich Posted February 17, 2005 Posted February 17, 2005 To CobaltSky I did try your method and it works just fine - but, after I found I couldn't find how to pass the window details as a script parameter (groan), I made it work by creating a new window and re-naming the original, and then all the rest of your suggestion - then re-naming the search window back to the original name. Works fine with almost no flicker. So I'm a bit puzzled at the need to pass window details as scriptpara - let alone how to do it! :-)
Recommended Posts
This topic is 7218 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