9 Replies Latest reply on Mar 7, 2011 3:39 PM by philmodjunk

    Go to Related Record conflict

    Mitch

      Title

      Go to Related Record conflict

      Post

      Hi,

      I have a database that has two basic layouts.  The Form Layout, which is in form view displaying one record at a time.  The second layout, List Layout displays records in list view.  On both layouts, a script runs on opening that resizes and centres each layout, this script also enters find mode and searches for only those records that are marked active (as simple field in each record with a value of '1' for active record and a '2' for not active) then sorts all found records in chronological order.  

      Prior to adding the find function into the opening script, each record displayed in List View had a script attached to one of the fields (record number).  This script would open the Form Layout and Go to the Related Record select in the List Layout.  

      Since the addition of find function, the Go to Related Record will no longer work.  

      Is there any way around this... whilst still maintaining a means of only displaying active records?

        • 1. Re: Go to Related Record conflict
          philmodjunk

          Why do you need both?

          Both methods pull up a new found set of records from scratch so whichever is performed last is the only one to produce a visible result. (Though GTRR will be different after the find as your current record may have changed.)

          If your Find script is intended to further filter whatever records are found by the GTRR, you can use Constrain Found Set instead of Perform Find.

          • 2. Re: Go to Related Record conflict
            Mitch

            Once I archive a record I do not want it to appear in any of the layouts, unless I un-archive it.  The List Layout is just another method of viewing data with the GTRR being a simple click to open the full record in the Form Layout.

            • 3. Re: Go to Related Record conflict
              philmodjunk

              Yes, but why do you need to use GTRR and then also perform a find? What does the find do that the GTRR does not do for you?

              • 4. Re: Go to Related Record conflict
                Mitch

                The List Layout only has all current non archived records listed. So it already sorted.  The Form layout also only has non archived records viewable.  I just want to go to one of them from the list.  You suggestion of Constrain Records works.

                • 5. Re: Go to Related Record conflict
                  philmodjunk

                  If both the form and list layouts refer to the same table occurrence in Show Records From in Layout Setup...., then all clicking the button in the list layout need do is change layouts. It can simply be Go To Layout [//select the form layout here].

                  This does leave the other records in the list in the same found set. That means that the book control in the status area the the mouse scroll wheel can be used to move to a different record. If that's not desirable, then a further find can be used to isolate just the clicked record. (If the listed records have a Primary Key field you can use a Go To Related Records for a self join relationship or you can use that Primary Key in a scripted find to isolate the clicked record in a single record found set.)

                  • 6. Re: Go to Related Record conflict
                    Mitch

                    I think that is my issue.  I have the Constrain Records function (to find only non archived records) in the script that opens up the layout...?  

                    • 7. Re: Go to Related Record conflict
                      philmodjunk

                      And why is that needed here? I suggested that as I thought you might have a situation where the GTRR pulled up a group of records, but you then needed to reduce that list to just those that match some additional criteria. That does not appear to me to be the case here...

                      • 8. Re: Go to Related Record conflict
                        Mitch

                        I believe I will have to work out another way of achieving the same thing.  I am trying to keep 'archived' records hidden from the database.  But available if needed later.

                        • 9. Re: Go to Related Record conflict
                          philmodjunk

                          Yes and a GTRR step or a find can do this. I just don't see the reason why you need to do both here just to keep the archived records hidden. Please keep in mind that I have an exremely limited understanding of your database structure.

                          If you have a field that identifies records as "archived" with a value in a given field, you can perform a find that finds all recors that do not have that value. Likewise a GTRR step can use a relationship that only matches the current record to records that do not have that value. But you shouldn't need to do both unless there is some detail here of which I am still unaware.