AnsweredAssumed Answered

Filter Portal with Multi-key value

Question asked by dangelsaurus on Jan 14, 2017
Latest reply on Jan 14, 2017 by philmodjunk

I have a project with the following tables (only relevent fields included below)

  • proposals
    • gSearch_Categories (global field)
  • proposals_details
  • products (including a table occurrence prt_products which has a Cartesian join to proposals)
    • id
    • name
    • category_id (multi-key field)
  • categories
    • id
    • description

 

I have a portal which displays a list of products from prt_products, and I would like to be able to use a portal filter to allow for a product to be in more than one category, however the filter is only picking the first value from the multi-key field.

 

The portal has radio boxes which correspond to the categories

The portal filter is setup as follows (1 is "All")

If (PROPOSALS::gSEARCH_CATEGORIES=1; 1; prt_PRODUCTS::CATEGORY_ID = PROPOSALS::gSEARCH_CATEGORIES) ;

 

what is needed for the filter to work as desired (allowing for multiple values of category_id)

 

products

idnamecategory_id
1Dog

2

3

2Cat

2

3

3Human3
4Fish2

 

categories

iddescription
1All
2

Pet

3Mammal

Outcomes