5 Replies Latest reply on Jun 16, 2017 9:06 AM by user28271

    Portal Filtering and Hiding

    user28271

      So I love the option to Filter a Portal, but I hate the fact that any calculations based on that portal will NOT be effected by the filtering. 

       

      At a minimum I want to be able to HIDE a portal when the filter result is nothing.

       

      For example I have a portal of OPEN TIME CARDS.  A time card is open until the Staff, their supervisor, and HR has signed off.

       

      I want one relationship with one portal for all open Time Card.  Based the get(account name) I display only the open TC require the current user to sign.  But I would like to have the entire portal HIDE when there is nothing left.

       

      Any ideas....

        • 1. Re: Portal Filtering and Hiding
          Philip_Jaffe

          Sure.  Just filter the TO relationship instead of at the portal level.  Then hide when count = 0.

          • 2. Re: Portal Filtering and Hiding
            philmodjunk

            Place this text inside the portal row:

             

            {{foundcount}}

             

            Use Hide Object When to make it invisible when in Browse mode. Give it an object name.

             

            Then the GetLayoutObjectAttribute function can be used to get the content of this layout object. If it's zero, there are no records showing in the portal.

            • 3. Re: Portal Filtering and Hiding
              Philip_Jaffe

              Oooh!  I like that trick!  Hadn't thought of that!

              • 4. Re: Portal Filtering and Hiding
                beverly

                I've read the entire thread and want to add to the discussion:

                 

                1. any aggregate (summary field) created in the child table and shown in the portal row will respect the relationship. This includes filtered portals! That being said, many have used a duplicate of the filtered (or unfiltered) portal and made it one row to display any of these aggregates. Side note: a GTRR button/script, will also respect the portal relationship and any filters, IF the button is inside the portal row (one or many).

                 

                2. any aggregate (calculation field) created (& shown) in the parent table:

                Count(child::status)

                will ONLY respect the relationship as defined on the graph. It does not account for any filtering that may be in the individual portal. So your

                any calculations based on that portal will NOT be effected by the filtering.

                is true from the Parent perspective on related children.

                 

                Both of these are valid fields, BTW!

                 

                3. in addition any "Symbol" (mostly the Get functions as layout objects)

                {{FoundCount}}

                in the portal row (filtered or otherwise) will be honored respective to the relationship and the filter (depends on the symbol). This can be leveraged, should the {{value}} be needed, but a summary or calculation not desired.

                 

                4. The

                GetLayoutObjectAttribute("objName"; "content")

                requires the "symbol" (or aggregate - summary field) to be named (in layout mode), so the value of it can be extracted.

                 

                HTH,

                Beverly

                • 5. Re: Portal Filtering and Hiding
                  user28271

                  To benefit of filtering is be can be on non-indexed fields.