JavaScript

{dialog.object}_filterList Method

Syntax

{dialog.object}._filterList(UXListName, filterExpn, orderExpn, filterParameters, havingExpn);

Arguments

UXListName

The name of the List control.

filterExpn

A filter expression to be applied to the SQL, DBF, or custom data source. You can use arguments in your expression. An argument is prefixed with a colon. For example, State = :whatstate

orderExpn

An order expression to be applied to the SQL, DBF, or custom data source.

filterParameters

A CR-LF delimited list of arguments used by the filter or having expression. Arguments are defined in the format value|||dataType|argumentName

havingExpn

A having expression for the SQL, DBF, or custom data source. You can use arguments in your expression. An argument is prefixed with a colon. For example, State = :whatstate

Description

Performs a server-side query to filter and/or sort the data in a List that is based on a SQL, DBF, or custom data source.

Discussion

If the filterExpn or havingExpn use arguments, the argument values must be specified in the filterParameters parameter.

The syntax for filter parameters is a CR-LF delimited list of values using the following syntax:

value|||dataType|argumentName

The example below demonstrates how to call {dialog.object}._filterList using arguments in the filter expression. In this example, a sort expression is defined to sort by lastname, descending and then within lastname by firstname.

//use \n to create a CR-LF delimited list
var params = 'Boston|||C|whatcity\nSmith|||C|whatname';
{dialog.object}._filterList('MYLIST1','city = :whatcity AND name = :whatname','',params);

Sorting the List 

In this example, the {dialog.objet}._filterList method is used to sort the list by 'city', descending:

var sort = "city DESC";
{dialog.object}._filterList('MYLIST1','',sort);

To sort by city ascending, the sort would be specified as "city ASC".