on_filter_record

on_filter_record(item)

The item parameter is the item that triggered the event.

domain: client

language: javascript

Description

Use an on_filter_record event to filter dataset records locally. It is triggered when the cursor moves to another record and Filtered property is set to true

Write an on_filter_record event handler to specify for each record in a dataset whether it should be visible to the application. To indicate that a record passes the filter condition, the on_filter_record event handler must return true.

The item parameter is the item that triggered the event.

Example

function on_filter_record(item) {
    if (item.type.value === 2) {
        return true;
    }
}

function enable_filtering(item) {
    item.filtered = true;
}

function disable_filtering(item) {
    item.filtered = false;
}

See also

Filtered