2 Replies Latest reply on May 9, 2011 12:40 PM by gasolineman

    find within a found set, then back again?

    gasolineman

      Title

      find within a found set, then back again?

      Post

      so i have a db were i am working in a found set of a date range.  ie: the db is 3 years in length and i did a find to see and work within records only for this week.  i also have a second field called Name that i would like to make a report where i see the records within that found set where the Name field is "bob" then when im done with the report i would like to exit it and go back to the first layout and be in the original found set of the date range for this week.

      i can accomplish this manually by simply doing a find for this week and include the Name field for the value "bob" which is ok, but i would like to have a button on the original layout that would take me to the report layout and then back without having to perform the find again.

      suggestions or questions?

        • 1. Re: find within a found set, then back again?
          philmodjunk

          Here's a trick for working with two different found sets without operations on one changing the other even when they are both from the same table:

          Open Manage | Database | Relationships

          Click on a Table Occurrence box for that table to select it, then click the button with two green plus signs to make a new table occurrence of the same table.

          Now click OK to leave Manage | Database and create a new layout to this new table occurrence. (Select the name of the new occurrence from the "show records from" drop down.

          Now your scripts (or if you do this by hand) can perform finds, sort records, omit records, etc. with one layout selected and these operations won't change what records are present in the found set on the other layout. So your script can freeze the window, change layouts perform the find, then do whatever else you need with this data and then switch back to your original layout where it's found set, current record, etc. will remain unchanged.

          Note: This can also be done without the extra table occurrence and layout, if you open a new window and do the operations on the same layout, but within the new window. This can be a bit trickier, however, if you are using windows, as the new window command can trigger an unwanted resize of the original window if the user is working with the database with the windows maximized. Using two layouts with different table occurrences avoids that issue.