bperry

Double-Restricted Search (by Category & by ElementTemplate)

Discussion created by bperry Employee on Sep 28, 2010
Latest reply on Jul 23, 2013 by hanyong

I'm trying to do an element search restricted not only by ElementTemplate but also by a Category.

 

After performing the initial filtering by ElementTemplate and receiving the AFNamedCollectionList<AFElement>, I am at a loss as to how to proceed and filter this list efficiently by Category.

 

For-nexting through each result might be less crazy than it sounds if the elements are bulk loaded, but at 2,000 elements, I'd be interested in a single call.

 

A workaround could be replacing the Category restriction (e.g. Active Device) with a hierarchical parent (also called Active Device), for use in AFElement.FindElementsByTemplate, but this creates artificial hierarchy requirements in this situation where I find a category much more appealing.

 

Any ideas?

Outcomes