6 Replies Latest reply on Sep 12, 2013 9:59 AM by philmodjunk

    Using a list of fields in a found set as the basis for a new set

    ShaneB

      Title

      Using a list of fields in a found set as the basis for a new set

      Post

           I would like my users to be able to quickly show all the "cluster" records a particular record appears in. For instance, if record 10 is used to inform records 14, 20, and 24, I would like them to be able to hit a button and have those cluster records 14, 20, and 24 displayed to them.

           The idea I had was that it would take the id of the record on the Observations table, run a find for that field on the ObservationsSelfJoin table, and use the record ids on the _fkLinkedObservationID column to loop through and mark those records in a global field, and then display the relevant records on the cluster layout.

           I'm not certain how to jump back and forth between the list of found records on the ObservationsSelfJoin table and the various layouts. Here is the closest I've been able to figure it out, but it's not working right:

           The set field [Observations 2::__keyholder_gk; etc line is for inserting the global key variable.

           Here is my database:

        • 1. Re: Using a list of fields in a found set as the basis for a new set
          philmodjunk

               Am I remembering correctly that If you are on a layout for Observations, Observations 2 represents the "cluster" records or is it the other way around?

               A single Go to Related Records step should be able to pull up all the Related records for the current record in your list.

          • 2. Re: Using a list of fields in a found set as the basis for a new set
            ShaneB

                 Yes, I can spend 15 minutes writing a script that doesn't work.... or use a single Go To Related Records command it works immediately. smiley

                 You are a huge help to me on this project. Thanks a ton.

            • 3. Re: Using a list of fields in a found set as the basis for a new set
              ShaneB

                   I am now having trouble making going from first-level clusters to second-level clusters, which are essentially the same thing as clusters, but instead of linking observation records to clusters I am liking cluster records to further refined records (called insights). My insight layout and portal to cluster records that make up the insight works perfectly, but when I place a Go To Related Records button on the Cluster records, it cannot bring up the matching insight-level records. Do I need to create Observations 3, 4, etc tables for these functions to work correctly? I am having a little trouble understanding how the data on the Observations and Observations 2 table is actually interacting.

              • 4. Re: Using a list of fields in a found set as the basis for a new set
                philmodjunk

                     Please explain the relationship between "insights" and "clusters". And are Insights also records in the observations table?

                     Is the relationship from insights to clusters to observations like this? Insights----<Clusters-----<Observations

                • 5. Re: Using a list of fields in a found set as the basis for a new set
                  ShaneB

                       Observations, Clusters, and Insights are all the same type of record stored on the Observations table. However, to users, they are different "levels" of Observations, created by combining lower level record types. They get an number (1, 2, 3, etc) for their level, which is stored on the observation_level field in the Observations table, and scripts search for that level and display only those types of records as users move between layouts via tabs. Users select records and combine them using a script (which at this point I'm sure you remember), which stores the parent-child relationship on the selfjoin table.

                       So observations are combined to create clusters, and clusters are combined to create Insights, and so on.

                        

                  • 6. Re: Using a list of fields in a found set as the basis for a new set
                    philmodjunk

                         Therefore my guess as to your relationships is correct. You have a one to many chain of relationships from Insights to Clusters to Observations.

                         (I would name my Table occurrences to match those terms where applicable in order to cut down on the confusion...)

                         Now you need to explain this part in more detail:

                         

                              but when I place a Go To Related Records button on the Cluster records, it cannot bring up the matching insight-level records.

                         What kind of layout design do you have here? Are these records listed in a portal or in the body of a list view layout? On what table occurrence is your layout based?

                         And maybe my guess isn't really correct. What is the precise set of table occurrences and relationships on which you have based this?