5 Replies Latest reply on Sep 10, 2013 11:26 AM by philmodjunk

    Portals: Sequentially setting fields

    tays01s

      Title

      Portals: Sequentially setting fields

      Post

           I've got portals on a main layout related to tables 1 < 2 < 3

           and buttons in portal 1 and 2 to select the related records in the portal 'below', ie 2 and 3, respectively. Each portal is sorted by a record date in descending order.

           Problem: However, when I select a record in portal 1 can automatically select the latest record in portal 2 and then portal 3?

        • 1. Re: Portals: Sequentially setting fields
          philmodjunk

               What are the relationships linking the table occurrences of the layout's table and the portals? What match fields and portal filters (if any) ?

          • 2. Re: Portals: Sequentially setting fields
            tays01s

                 - Relationships: Main layout (table 0) < table 1 < table 2 < table 3

                 - Match fields: 0_ID < fk0_ID, 1_ID < fk1_ID, 2_ID < fk2_ID (the numbers are just shorthand for real tablenames).

                 - Portal filters:

                 a) P1, no filter

                 b) P2: 2::_1ID=0::1_n (where n=number of record in T1)

                 c) P3: 3::_2ID=0::1_n (where n=number of record in T2)

            • 3. Re: Portals: Sequentially setting fields
              philmodjunk

                   real table names are actually easier to read and keep track of than numbers. Using names and my personal notation preference would yield:

                   Table0----<Table1----<Table2-----<Table3

                   Table0::__pkTable0_ID = Table1::_fkTable0_ID
                   Table1::__pkTable1_ID = Table2::_fkTable1_ID
                   Table2::__pkTable2_ID = Table3::_fkTable2_ID

                   Thus a) make sense but b) and c)

                   P2: 2::_1ID=0::1_n (where n=number of record in T1)
                   P3: 3::_2ID=0::1_n (where n=number of record in T2)

                   do not. Given the above relationships, why are you setting a field in Table 0 to a value from Table 1 and why is it the SAME value for both the Table 2 and Table 3 portals? That might work, but not for the relationships that you've specified.

                   For an explanation of the notation that I am using, see the first post of: Common Forum Relationship and Field Notations Explained

              • 4. Re: Portals: Sequentially setting fields
                tays01s

                     Apologies, I copied then forgot to alter appropriately. See below as I'd meant them to be:

                      

                     b) P2: 2::_1ID=0::1_n (where n=number of record in T1)

                     c) P3: 3::_2ID=0::2_n (where n=number of record in T2)

                     ie. the field numerating for P3 has changed in c)

                • 5. Re: Portals: Sequentially setting fields
                  philmodjunk

                       If "number of the record" refers to a value in the record's field that uniquely identifies it, (Not the portal row number), then you have what appears to be a series of "master slave" or "master detail" records. Here's a thread that describes ways to set this up for two portals: Need layout solution for nested portals...

                       Once the first two are working, you should be able to figure out how to also get it working for 3 portals.