1 Reply Latest reply on Jun 20, 2012 11:02 AM by philmodjunk

    How to return to same record



      How to return to same record


      I have multiple layouts however there are three that are "primary" and from which I do finds.  After looking at one of the three "master" layouts, I often go to other layouts (such as pdf documents that are attached and related).  Upon return to any of the primary layouts, record number 1 is always the record that shows.  I want to have the primary layout keep the chosen record as I flip to other layouts.  How?  Thanks


        • 1. Re: How to return to same record

          You'll need to tell us more about those layouts and what your user actions and scripts are doing.

          Each layout is based on a specific table occurrence. A table occurrence is a "box" found in Manage | Database | Relationships. You can determine which table occurrence is specified for a given layout by checking Layout Setup... where you'll find the occurrence selected in the "Show Records From" drop down in this dialog box.

          The key detail is that for a given window, each table occurrence has it's own found set, current record, and sort order. If two layouts are based on the same table occurrence, changes to the found set on one layout will also change it for the other as they both share the same occurrence and thus the same found set.

          Thus, some action performed by you or by a script is changing the current record and possibly the found set. A script trigger on your layout could perform a script that does this or some action by you is causing it on one of the other layouts.

          It'll depend on what you find out as you investigate this as to what method best serves to keep the current record from changing on you.

          Options include:

          1. basing other layouts on different occurrences of the same data source table so that their found sets are not the same.
          2. Using a variable with a script to save the RecordNumber, RecordID or the value of a PrimaryKey field so that returning to the layout trips a trigger that restores the current record using the value stored in that variable.
          3. Doing tasks on another layout only after opening up a separate window as that also produces an independent found set.