Mandu Posted May 14, 2010 Posted May 14, 2010 Basic question: what is a found set associated with (or, "what does a found set belong to")? A window? A layout? A portal? A script step? A table occurrence? Same question about a "current record". Thanks Chap
Mandu Posted May 14, 2010 Author Posted May 14, 2010 A table occurrence AND a window. Sorry to seem dense, but do you mean that when a windows closes, the FS disappears? Or that a FS persists when you open a different layout in the same window? A script can run without opening a window. Can it create a FS without opening a window? I'm having trouble visualizing the relationships between these various entities.
comment Posted May 14, 2010 Posted May 14, 2010 When you close a window, ALL its found sets are lost. A script can run without opening a window, but not without a window being open. If a script (or a user) creates a found set, it "belongs" to the TO of the current layout in the current window.
Mandu Posted May 14, 2010 Author Posted May 14, 2010 When you close a window, ALL its found sets are lost. [...]If a script (or a user) creates a found set, it "belongs" to the TO of the current layout in the current window. This helps.... So it sounds, from that, like a single window can have multiple FS's, by virtue of having gone to different layouts during the "lifetime" of the window.... And from that I would guess that reverting to a previous layout "brings back" its most recent FS...? So is an individual layout inextricably "bound" to a particular TO? Or is it possible to somehow bind it to other TO's with the same underlying table? Thanks!
comment Posted May 14, 2010 Posted May 14, 2010 I would prefer to put it this way: a TO keeps a found set for each open window. A layout definitely belongs to a specific TO - it's the one you have selected in Layout Setup > General > Show records from:[xyz]. There is an exception to this rule: the Go to Related Record[] script step allows you to pick any layout of the underlying TABLE, even if it doesn't belong to the target TO. But then the created found set belongs to the TO of the picked layout.
Mandu Posted May 14, 2010 Author Posted May 14, 2010 I would prefer to put it this way: a TO keeps a found set for each open window. Not sure of the distinction you're making - but I think I'm okay on this point. A layout definitely belongs to a specific TO - it's the one you have selected in Layout Setup > General > Show records from:[xyz]. There is an exception to this rule: the Go to Related Record[] script step allows you to pick any layout of the underlying TABLE, even if it doesn't belong to the target TO. But then the created found set belongs to the TO of the picked layout. I think it was GTRR that started clouding my understanding in the first place.... If the underlying table is t_Orders, and I want to GTRR to a record in a portal of LineItems, I think I can go to a related record from t_LineItems and display it using any layout that belongs to a TO whose underlying table is t_LineItems (call it "L_LineItems_from_Orders"). And the resulting FS of LineItems then belongs to L_LineItems_from_Orders. Is that what you said? -)
comment Posted May 14, 2010 Posted May 14, 2010 I am not sure I follow your example. Say you have these TO's on your graph: Orders -< LineItems LineItems 2 and layouts named the same as their TO's. If you GTRR from Orders to LineItems using layout "LineItems 2", you end up in a layout belonging to LineItems 2 - and that's where the new found set is, too. The found set of LineItems remains unaffected.
Mandu Posted May 14, 2010 Author Posted May 14, 2010 I am not sure I follow your example. Say you have these TO's on your graph: Orders -< LineItems LineItems 2 and layouts named the same as their TO's. If you GTRR from Orders to LineItems using layout "LineItems 2", you end up in a layout belonging to LineItems 2 - and that's where the new found set is, too. The found set of LineItems remains unaffected. Yes, that makes sense, although in my example I didn't mean to imply that I had a "LineItems 2". To use your TO names, I was simply using LineItems (the same TO being used to display the portal) as the target TO for my GTRR. I do get that Found Sets are "connected to" the TO that was being when the FS was created - say, via GTRR. You've been very helpful in my effort to grok this. Do you know of ANY published docs that address these intricacies with this kind of rigor and precision? I've never found any. Thanks, Chap
Fenton Posted May 14, 2010 Posted May 14, 2010 Here is another place you can learn about a special use of this method, to store and restore found sets. http://www.sumware.net/robfm/savingfoundsets.php
Mandu Posted May 14, 2010 Author Posted May 14, 2010 Interesting article, thanks. It contains the following statement: Things get interesting if you GTRR to a layout, and that layout is based on the same table as originating layout, and the layout has no connection to the originating layout. I don't understand the final condition, "and the layout has no connection to the originating layout." What does it mean for one layout to be "connected" to another?
Vaughan Posted May 14, 2010 Posted May 14, 2010 Connected, as in joined together on the relationships graph.
Recommended Posts
This topic is 5306 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