Server-Side Index Filtering
To enable server-side index filtering, use <vdl-index-filter>
within <vdl-datagrid>
. When an index filter is within a <vdl-datagrid-column>
, all data is returned. Data can be filtered by one or more indices:
- Single-index filter: In this example, the index filter is defined at the
<vdl-datagrid>
level. The filter is applied on the server, which returns only the filtered data.<vdl-var name="singleFilter" value=""></vdl-var> <vdl-action-group name="updateSingleFilter"> <vdl-action-set-var var="singleFilter"></vdl-action-set-var> </vdl-action-group> <vdl-form> <vdl-field label="Choose filter value" label-size="3" size="3" options-set="t3IndexA" options-include-empty="true" vdl-event="change: actions.updateSingleFilter"></vdl-field> </vdl-form> <vdl-datagrid vdl-if="=vars.singleFilter" height="400"> <vdl-index-filter set="t3IndexA" value="=vars.singleFilter"></vdl-index-filter> <vdl-datagrid-column set="t3IndexA" vdl-visible="=true"></vdl-datagrid-column> <vdl-datagrid-column entity="t3Col1"></vdl-datagrid-column> <vdl-datagrid-column entity="t3Col3"></vdl-datagrid-column> </vdl-datagrid>
- Multiple-index filter: When an index filter is used at the
<vdl-datagrid>
level, it can accept multiple values. The index filter requests array data from the server to include all rows that include any of the specified values for that index set. This increases the amount of data requested from the server.<vdl-var name="multiFilter" value=""></vdl-var> <vdl-action-group name="updateMultiFilter"> <vdl-action-set-var var="multiFilter"></vdl-action-set-var> </vdl-action-group> <vdl-form> <vdl-field label="Choose months" label-size="3" size="5" options-set="MonthsOfYear" multiple="true" vdl-event="change: actions.updateMultiFilter"></vdl-field> </vdl-form> <vdl-datagrid vdl-if="=vars.multiFilter.length > 0"> <vdl-index-filter set="MonthsOfYear" value="=vars.multiFilter"></vdl-index-filter> <vdl-datagrid-column entity="FactorySupply" heading="='Supply (' + i + ')'" vdl-repeat="=i in vars.multiFilter"> <vdl-index-filter set="MonthsOfYear" value="=i"></vdl-index-filter> </vdl-datagrid-column> </vdl-datagrid>
Tip: Because of the internal data structure, multiple-index filtering can significantly increase server resource demands. To avoid performance issues, it is recommended that you use only a single server-side index filter with very large datasets.
© 2001-2025 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.