$.udb(ds).searchCols()
This article is about the searchCols() function of the DataSourceContainer object.
$.udb(ds).searchCols()
Gets a collection of search conditions (in the form of column values) that is current for the data source. There is at most 1 current search condition value for each column at any one time.
Returns a Cols object.
Syntax
$.udb( *ds* ).searchCols( *columns* )
The optional ds is a data source selector.
The optional columns is a string value or an array of string values in which each value is a column name. If columns is omitted, all the columns in the data source are returned.
Examples
$.udb('EMP').searchCols().clear();
$.udb('EMP').searchCols('EMPNO').val('10');
Notes
When you navigate to a different page using page chaining, for example by calling .navigateTo(), then unlike Edit values, Search values are not automatically transferred to the target page. To make them available in the target page, you must loop over them:
$.udb('TOUR').executeQuery().then(function(dsc){
var searchCols = {};
dsc.searchCols().each(function(index,col){
searchCols[col.name()] = col.val();
});
$.udb.executeInContext( dsc.context, function(){
$.udb.navigateTo("Tours Info 1.2 Results").then(function(){
$.udb('TOUR').searchCols().each(function(index,col){
col.val(searchCols[col.name()]);
});
});
});
});