AnsweredAssumed Answered

Manual vs. Evaluated Portal Filter Text

Question asked by jtu on Sep 6, 2016
Latest reply on Sep 14, 2016 by jtu

I have a set of ~ 25,000 products which are described by the combination of several attributes. I want to filter the set based on OR criteria within attribute and AND criteria across attributes. I am currently using a portal to filter and view the results, so the calculation specified for filtering looks something like this:


If ( (Product::attribute1_ID=3  or Product::attribute1_ID=4 or Product::attribute1_ID=5) and (Product::attribute2_ID=5) and (Product::attribute3_ID=9); 1 )


If I manually type the filter criteria into the Specify Calculation dialog for filtering the portal, the filter runs nearly instantly. However, I haven’t been able to find a way to set that calculation via a script; and if I have the calculation reference a global variable in a table (e.g., “Evaluate (Filter::FILTERTEXT)”) or created via a script (“Evaluate($$FilterText)”), the filter takes several seconds to run. Is there a simple way around this that I’m missing?