Initializing help system before first use

Filtering Table Rows

Table rows can be filtered based on the result of an expression.

When rows are filtered out, they are removed from the table dataset before the table is rendered, and so won't trigger any custom renderers, and won't be included in any table or column level user filtering.

To filter rows, you provide an expression to the row-filter attribute of a <vdl-table> element. This can be a simple Boolean expression, an inline function or a function identifier. In all cases, the following arguments are provided:
  • rowData: data for all the row cells.
  • indices: data for the index columns of the row.
  • position: row position in the table.
  • tableData: data for all table rows and contained cells.

When an inline function or a function identifier is specified, they should return a Boolean result, with true signifying that a row should be kept, and false signifying that a row should be discarded. The function is called for each row in the table before it is rendered to the view.

In the following example, the Shares_fraction array component is displayed having discarded rows where the calculated investment equals zero.
<vdl version="4.7">  
    <vdl-page>
        <vdl-section>
            <vdl-row>
                <vdl-column>
                    <vdl-table row-filter="=rowData[1] > 0.0">
                        <vdl-table-column entity="Shares_fraction" heading="Allocation of investment" size="3"></vdl-table-column>
                    </vdl-table>
                </vdl-column>
            </vdl-row>
        </vdl-section>
    </vdl-page>
</vdl>

Render Results of Row Filtering

Rendered Results of Row Filtering

© 2001-2020 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.