Here is the solution:
In SSJS you can code the following directly...
@DbColumn(@DbName(),"viewName",1)
If you want to do the same using the session.Evaluate(), then you can try the following.
//@DbColumn(@DbName(),"viewName",1) --> in SSJS
//@DbColumn( class : cache ; server : database ; view ; columnNumber ) --> in Formula using Evaluate
var colValues = "@DbColumn(\"\":\"\";" + @DbName() + ";\"viewName\";1)";
print ("colValues[0]" + colValues[0]); // will print @DbColumn( "":""; ServerName ; viewName; 1)
print ("colValues[1]" + colValues[1]); // will print @DbColumn( "":""; DatabaseName; viewName; 1)
return session.evaluate(colValues[1]) // It will return the expected value in listbox
Because @DbName() will return both the server name and the database name. Whereas we need only the database name. This is only for the current server. For different server we need to specify the server name. I hope this will help...!!!