2 Replies Latest reply on Jan 3, 2014 2:30 PM by IT_User

    Drop Down Portal Filtering

    IT_User

      Title

      Drop Down Portal Filtering

      Post

           I have been trying something like the 3rd solution listed here:

      How to control  filter portal with drop down box

           But my calculation isn't exactly working correctly.  It works on empty values and when I pick the first category.  When I pick the subcategory it doesn't do anything until I delete whatever is in the first category.

           In other words, when nothing is inputted all items show, when the first category is inputted the the list filters correctly.  When the subcategory is inputted after that, the list does not filter anymore.  If I delete what is in the first category, but leave the subcategory the same, then it filters correctly.

           Here is my calculation I am using for the portal filtering:

           Case (
             IsEmpty ( INVENTORY::globalCat ) and IsEmpty ( INVENTORY::globalCatSub ) ;
                 1 ;
                ( ( INVENTORY::globalCat = inventory_PRODUCT_search::category )
                and ( not IsEmpty ( INVENTORY::globalCat ) ) ) ;
                 2 ;
                ( ( INVENTORY::globalCatSub = inventory_PRODUCT_search::catSub )
                  and ( not IsEmpty ( INVENTORY::globalCatSub ) ) ) ;
                 3
           ; 0 )

           Inventory is the layout table, and Product is the portal table

           I've been trying to figure this out for a while, and can't seem to go at it anymore myself.  Any help is appreciated. Thank you!

        • 1. Re: Drop Down Portal Filtering
          philmodjunk

               Take a look at this expression:

               ( ( INVENTORY::globalCat = inventory_PRODUCT_search::category )
                    and ( not IsEmpty ( INVENTORY::globalCat ) ) ) ;

               It evaluates as "True" whether or not there is any value in globalCatSub. Case goes with the first True result so the 3rd Boolean expression never evaluates.

          • 2. Re: Drop Down Portal Filtering
            IT_User

                 Oh, yes, which is why I changed it to this at one point:

                 ( ( INVENTORY::globalCat = inventory_PRODUCT_search::category )
                      and ( not IsEmpty ( INVENTORY::globalCat ) ) and ( IsEmpty ( INVENTORY::globalCatSub ) )

                 For some reason it didn't seem to work then, but appears to work now, so I must have done something in between then and now.

                 Anyways, thank you Phil!