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

 

If you want to print Advanced search or Search panel parameters on the List page, add C#/VB.NET code snippet with following code:

 

if (XSession.Session[GlobalVars.strTableName.ToString() + "_advsearch"] != null)
{
dynamic searchClauseObj = (SearchClause) XSession.Session[GlobalVars.strTableName.ToString() + "_advsearch"];
XVar fieldSearchData = searchClauseObj.getSearchCtrlParams("Make");
for(int i = 0; i < fieldSearchData.Count(); i++)
{
    XVar fName = fieldSearchData[i]["fName"];
    XVar val1 = fieldSearchData[i]["value1"];
    XVar val2 = fieldSearchData[i]["value2"];
    XVar srchCat = fieldSearchData[i]["opt"];
    XVar srchNot = fieldSearchData[i]["not"];
    MVCFunctions.Echo("Search was completed." + "<br>");
    MVCFunctions.Echo("Search Field: " + fName.ToString() + "<br>");
    MVCFunctions.Echo("Search Option: " + val1.ToString() + "<br>");
}
}