7 Replies Latest reply on Feb 13, 2017 6:08 PM by Philip_Jaffe

    Go to Specific Portal Row

    jzbubble

      Can someone teach me how to use this go to portal row in script? I tried a lot of times but cannot get it right. Thanks in advance. Table 2 is portal to table 1. I am currently like in record 3 of table 2. I want to go to directly specific portal row of record 3 in table one. I think I need use calculation but how?  Thanks again

        • 1. Re: Go to Specific Portal Row
          Philip_Jaffe

          You can use Go To Portal Row to go to First, Last, Next, Previous, or By Calculation...

           

          If you want to go to portal row 3 (the third record in the row) use by Calculation and either hard code the number 3, or use a variable or calculation that results in a number.

           

          Does this help?  Not sure I completely understand your issue.  Do you want to go to a portal row, or link to a related record in a portal row?

          • 2. Re: Go to Specific Portal Row
            philmodjunk

            There is no way to specify which portal in which to select the portal row within the Go To Portal Row script step. Thus, it is sometimes necessary to give the portal an object name and use go to object first to put the focus on the right portal first, then use go to portal row to put the focus on a specific portal row.

             

            And keep in mind that this step can trip script triggers that change the focus on you.

             

            Also, since there is always a chance that you might add another portal to the layout in the future, it's "best practice" to use go to object even if you currently have only one portal.

            • 3. Re: Go to Specific Portal Row
              jzbubble

              Thanks Judd 45 & Philmodjunk. Let me elaborate. I am in one record from Table 2. I set up a button. I wish when clicking it, it leads me automatically to table 1's portal and highlight special portal row by  contact name ( field name from table 2).

               

              For example, I am in one record John Taylor from table 2. Clicking the buttons and it leads to portal in Table 1. highlight John Taylor row automatically. I know how to go to table 1 but cannot go to specific portal row.

               

              Many thanks.

              • 4. Re: Go to Specific Portal Row
                Philip_Jaffe

                So both Table 1 and Table 2 have a portal which has the same base table?  Or is the portal in Table 1 based on a Table 2 Table Occurrence, and the portal in Table 2 is based on a Table 1 table occurrence?

                • 5. Re: Go to Specific Portal Row
                  jzbubble

                  Table 2 is in table 1 as portal.

                  • 6. Re: Go to Specific Portal Row
                    philmodjunk

                    Is this one layout or two?

                     

                    Do you have a layout based on table 2 where you place that button? Do you the have a layout based on table 2 that has a portal to table 1? Thus, the record on layout for table 1 is the same record that you want to select in the portal on the layout for table 2?

                     

                    If I have guessed correctly, why do it? What most users need to do is the exact opposite, they click a button in the portal row in order to bring up the portal record on its own layout.

                    • 7. Re: Go to Specific Portal Row
                      Philip_Jaffe

                      So let's say you are in John Taylor's record in Table 2.  When you click a button, you want to go to a table 1 layout, where there is a portal based on Table 2?

                       

                      First you would need to know if any records in Table 1 actually have a relationship to John Taylor.  There could be zero, one, or many.  Presuming that you land on a record that HAS a John Taylor record in its portal, you could do a looping script that walks through the portal comparing IDs and stopping once it finds a match to John Taylor's ID.  Then it would depend on how that portal is sorted (and perhaps filtered) as to which John Taylor record it finds first in the portal (assuming there is more than one.

                       

                      But I am not sure there might not be a better way to do things.  You are basically going from the "one" to potentially "many" (or one or none).