2 Replies Latest reply on Jul 18, 2014 8:45 AM by j.hall

    Multiple Portal Filters

    j.hall

      Title

      Multiple Portal Filters

      Post

           I have a table with all the inventory for strips.

           Then I have a table that allows the user to pick strips and add them to a list.

           There are about 4 items that they can filter on. Right now, they have to fill out all 4 to get a list, or have none and they get all the files. (The strips table has about 20,000 records) 

           I would like it to update with each selection.

           So if they choose Grade it would filter out all the strips that didn't match that grade. Then when they picked Walls, it would filter out any that didn't match both.

           It's a cartesian relationship and they use global fields for the selections. But I'm having a bear of a time getting it to filter out the individual items.

           Any assistance would be helpful.

        • 1. Re: Multiple Portal Filters
          philmodjunk

               You can string together a lot of Or operators and pairs of parenthesis to get what you want or you can use the Case function: Either way, the catch here is that the number of possible filter combinations to be allowed for with 4 fields is quite large and tedious to set up:

               Case ( IsEmpty ( PortalTable::Field1 & PortalTable::Field2 & PortalTable::Field3 ) and PortalTable::Field4 = Globals::Globalfield4 ; True ;
                          IsEmpty ( PortalTable::Field2 & PortalTable::Field3 & PortalTable::Field4 ) and PortalTable::Field1 = Globals::Globalfield1 ; True ;
                          // continue this pattern so that you can leave three fields empty and specify only filter data in the 4th global field.
                         IsEmpty ( PortalTable::Field1 & PortalTable::Field2  ) and
                                                                       PortalTable::Field3 = Globals::GlobalField3 and PortalTable::Field4 = Globals::Globalfield4 ; True ;
                          //See the pattern here?

               There's a lot more clauses to the Case function to go before you have something for every possible combination of empty fields and fields with specified values in your 4 global fields.

          • 2. Re: Multiple Portal Filters
            j.hall

                 That's what I was thinking, I may just skip it. I don't think it would be that useful to see the full list anyway. 

                 Thanks