I've written a web part that generates several KPIs based off a list given: - List and column names placed in custom configuration values - Parameters at run time
Each KPI is composed from a set of list rows dependent on the KPI and parameters. I.e., KPI 1 can be calculated from rows 1, 2 and 3 while KPI 2 can be calculated from rows 2, 4 and 6.
I want to be able to click on one of the KPI's and filter the list by the ID's that were used to calculate the KPI. The only solution I've found is to create a CAML statement with a List View Web Part but some KPI's will have up to a 1,000 records making the generated CAML statements pretty huge.
Ex. CAML with 3 records
<query>
<where>
<or>
<or>
<eq>
<fieldref name="ID">
<value type="Counter">1</value>
</fieldref>
</eq>
<eq>
<fieldref name="ID">
<value type="Counter">2</value>
</fieldref>
</eq>
</or>
<eq>
<fieldref name="ID">
<value type="Counter">3</value>
</fieldref>
</eq>
</or>
</where>
</query>
QUESTION
Is there a more efficient way to do this. I simply want to get all the rows that made up each KPI. Preferably using the List View Web Part so the user can further filter and sort as they wish.
