Appframe Knowledge Base


1 hits
0

How to set filterString, whereClause, filterObject and whereObject on a data object in JavaScript

// Setting of whereClause and filterString as strings is no longer recommended and may be removed in the near future.
// If an AppSetting called DisableClientSideFilterStrings is set to true, filterString and whereClause will be ignored.

// To set filterString
ds.setParameter("filterString", vFilter);
ds.recordSource.setFilterString(vFilter);

// To set whereClause
ds.setParameter("whereClause", vFilter);
ds.recordSource.setWhereClause(vFilter);

// NOTE: There is a separate kb article on how to define a filter object

// To set filterObject
ds.setParameter("filterObject", vFilterObject);
ds.recordSource.setFilterObject(vFilterObject);

// To set whereObject
ds.setParameter("whereObject", vFilterObject);
ds.recordSource.setWhereObject(vFilterObject);

// Setting filter will not automatically refresh the datasource
// So you will have to call refreshDataSource after setting the filter
ds.refreshDataSource();

components dataobject web · Perma link post comment Posted by: Øystein Kaldestad (12-apr-2013)