4 Replies Latest reply on May 18, 2012 9:00 AM by Vinny

    Go to Desired Portal Row

    Vinny

      Title

      Go to Desired Portal Row

      Post

      Hello,

      I have a "hybrid" customers layout, with a portal on the left of all customers, and the rest of the layout is a customer's detail.

      The portal on the left is the main list for navigation; that is, if you select a customer from the portal, it displays that customer's information on the layout.  This works using go to related record, and it works great.

      However, with this layout, I'm finding several issues related to keeping the selected portal row in sync with the rest of the layout.

      Say for example, I go to a specific customer from another layout.  The Customer layout will show the correct customer info, but the portal row is not selected, and or not showing (as visible on the screen) the correct customer being selected.

      I have vertical scroll bars on in the portal, so I assume that if I go to the correct portal row, it will make the current selection visible.

      So...how do I "initialize" the layout so that when going directly to a customer, I can go to the correct portal row to make it look like I'm on that customer in the list (portal)?

        • 1. Re: Go to Desired Portal Row
          GuyStevens

          Would something like this work?

          http://dl.dropbox.com/u/18099008/Demo_Files/ContactsWithPortal.fp7

          For the highlight you set conditional formatting to the field in the portal.

          You set it so that the fields get's a background fill when the ID of the portal record equals the ID of the record your layout is based on.

          Like: Contacts::ID = ContactsPortal::ID

          Then for the GRTT you set the field in the portal to be a button that performs folliwong script:

          image

          • 2. Re: Go to Desired Portal Row
            Vinny

            I have that portion working.  It's when you go to that layout looking for a specific customer.

            So...if I'm on a different layout, and I click the customer name, I'm taken to the customers layout, and specifically to the customer's record.

            BUT, I now need to update the portal to show (make visible) that I'm looking at that item.

            What I'm doing now is, when I go to the customer's layout, I loop through all portal items until the portal item's ID = the main record's ID.

            This works, but the conditional formating looks a little weird (discolored) because I'm actually ON that portal row, when all I really want to do is make it visible in terms of it's location in the list and scroll bar.

            Conditional formatting is already set up, it's just a matter of getting the scroll bar in the right place so that the portal row is visible.

            • 3. Re: Go to Desired Portal Row
              Vinny

              Also, I'm noticing something strange.

              After I loop through the portal rows, and once I find the right portal row, I exit the loop.

              As I mentioned before, when the script is done, my current (highlighted) portal row's color looks funny because it is "selected".  I confirmed there are no appearance attributes set on this field that would make it look different when selected, so this seems to be a system controlled thing.

              So...I added a step in my script to: (2 different attemps):

              1) Commit records (to leave the field) - this forces the portal to reset to the top row

              2) Go to next field also causes the portal to reset.

              i've confirmed I don't have the portal's scroll bar to reset.

               

              Any ideas?

              • 4. Re: Go to Desired Portal Row
                Vinny

                Sorry...the "strange part" is that when I used idea #1 (Commit Records) with script debugger ON, it works (leaves the field in the portal row in the right position), but without the script debugger, it doesn't.

                Results are different if I'm using the debugger.

                Strange....