Please enable JavaScript to view this site.

Navigation: Advanced topics > Events > Sample events > Appearance

Print search parameters on the List page

Scroll Prev Next More

 

Example 1

 

Print Advanced search or Search panel parameters on the List page. To do so, insert a C#/VB.NET code snippet with following code into a List page:

 

 

dynamic srchObj = SearchClause.getSearchObject(strTableName);
dynamic fields = srchObj.getSearchFields();
if(MVCFunctions.count(fields))
MVCFunctions.Echo("Search was completed."."<br>");
foreach (field in fields) {
MVCFunctions.Echo(MVCFunctions.Concat(field.Key,": " ,srchObj.getSearchOption(field.Key)));
if (srchObj.getSearchOption(field.Key)=="Between") {
  MVCFunctions.Echo(MVCFunctions.Concat(" AND ",srchObj.getSecondFieldValue(field.Key)));
}
MVCFunctions.Echo(MVCFunctions.Concat(" ",srchObj.getFieldValue(field.Key)));
MVCFunctions.Echo("<br>");
}

 

 

 

Example 2

 

Print basic search parameters on a List page:

 

dynamic srchObj = SearchClause.getSearchObject(GlobalVars.strTableName);
dynamic fields = srchObj.getSearchFields();
if(fields.Count())
MVCFunctions.Echo("Search was completed.<br>");
MVCFunctions.Echo(srchObj.getAllFieldsSearchValue());

 

 

See also:

getSearchObject

getFieldValue

getSecondFieldValue

getSearchOption

SearchAPI

Insert code snippet