2 Replies Latest reply on Jan 3, 2015 2:34 PM by JoanneMarcotte

    Filtering portal of grandchild table

    JoanneMarcotte

      Title

      Filtering portal of grandchild table

      Post

      Hi,
      In the contexte of a grandparent table (Clients), I would like to have on a layout 1) a first portal with the related rows of a second table (People) and 2) a second portal with related rows of a third table (Accounts).

      How may I go about filtering in the second portal (the Accounts portal), according to the selected row in the People portal?

      Thank you.

        • 1. Re: Filtering portal of grandchild table
          SteveMartino

          If you have this relationship  Clients>People>Accounts, put 2 portals on the Clients layout.  People portal shows related records from Clients.  Add a button for each row with this script:

          Set Variable [$id; (Put the People primary key here)]

          Refresh Window [Flush cached join results]

          Next on the second portal Accounts, filter the relationship like this:

          Table::field = $id

          Where 'Table::field' is the foreign key from People.

          Everytime you click the button on the People portal, the Accounts portal will change.

          Now you can do some other things so you know which record you are relating to, but this should get you started

          Edit:.....continuing on....

          Change the script to:

          Set Variable [$id; (Put the People primary key here)]

          Set Variable [$name; (Put the Person name field here)]

          Refresh Window [Flush cached join results]

          Then put a merge field above the second portal with <<Client Name field>> | <<$name>>  and it will change when you click the button on each portal row