3 Replies Latest reply on May 23, 2016 12:07 AM by bigtom

    Multiple criteria to filter portal

    nanioff

      Hello,

       

      I want to filter a portal which brings Products according to Brand, Category and Project which are all parent tables. I have attached a sample file.

       

      Approximately,      Brands will have 100-200 records,

                                    Categories will have 10-15 records,

                                    Projects will have 30-50 records.

       

                                    Products will have 3000-5000 records.

       

      This is why I am creating Product records including Category data within so that "Products with Category" is bound.

       

      When necessary I bind      "Categories with Brands"           (Easy to manage 10-15 records)

                                                 "Projects with Brands"               (Every project demands special group of brands proper to itself.

                                                 "Projects with Products"            (Every project has its own group of products with different Product Name, Unit and Code) 

       

      So when I make an Order Demand, I want its portal to bring Products according to 9 different probabilities.

       

      (Brands, Brands and Project, Brands and Category, Category, Category and Project, Brands, Category and Project, Brands or Project, Brands or Category, Category or Project, Category or Project or Brand)

       

      Is it possible?

       

      Thanks for your help.

        • 1. Re: Multiple criteria to filter portal
          bigtom

          Join table with fk's to Brands, Category, Project and Order demand. Your portal is based on the join table. Not sure what you are doing with Lines, but you get the idea. Currently you are only joining two of the three tables you need.

           

          Lines_Brand_Category_Project (table)

          JoinIDpk

          CategorySerialNo_fk

          BrandSerialNo_fk

          ProjectSerialNo_fk

          • 2. Re: Multiple criteria to filter portal
            nanioff

            Thanks for your reply.

             

            I have reorganised tables in the attached file as you have guided. How can I filter a portal in OrderDemand to bring products according to Brand/Category/Project with 'AND' / 'OR' options within each other? I also need bring Products and/or ProductsNameInProject option.

             

            The thing here is, some products are named as '3.18mm Lens' in my database, but in a project it is called as '3 18 LENS'. Same as their units. I call it Meter, but in contract signed in a project says that 'M' only. Different strings matter that's why, I need an option that will allow me to bring products with the names in their project if I choose a project as a filter option. In addition If I choose Project ' or ' Category option, It has to bring me products with project names and products assigned to that category with the names in my Product database together. Also If I choose a brand as a filter option. It has to filter Brands_fk field and bring category matches where there is no Projects input is recorded.

             

            I wish I could have made it more clear.

            • 3. Re: Multiple criteria to filter portal
              bigtom

              About the different names...

               

              I saw you made the mistake of using the name as the ID field. You should have a specific non changing ID (UUID) for the relationship. This way you can have names that do not match but as long as you set the relationship they will always be linked.

               

              You need a complex calc in the portal filter that will account for each condition. I would use global fields with value lists from the respective fields. Replying by phone now and not at a desktop.

               

              I am not sure how useful the portal will be. Have you considered using a list view with your order demand data in the header?