Xpages - domino view data source - configurable name?

Hi,I have a scenario where I need to have a domino view data source from a different database. But selecting the filepath from dropdown causes a hardcoded code. This works fine, but I need to fetch the server and database path from a keyword document.

How can I achieve this?

Thanks,

Trapti

Subject: compute the filename, everything in XPages (for the most part) is computable

Subject: Try something like this

ProfileDoc lookup to get the configuration path to database

var db = session.getCurrentDatabase();

var pddoc:NotesDocument=db.getProfileDocument(“pdconfig”,‘’);

var pcpref:string=pcdoc.getItemValueString(“Server”);

_server = pcpref;

if(_server == “*”){_server=@Subset(@DbName(), 1)}else{_server= _server};

_db = pddoc.getItemValueString(“FilePath”);

sessionScope.activityServer=_server;

sessionScope.activityDB=_db;

Computed server entry (other)

var cserv=database.getServer();

var serv=@Subset(@DbName(), 1);

var db=sessionScope.get(“activityDb”) //scopeVariable from profileDoc lookup;

if(serv==“” ||serv==null){

return db

}else{

return @Name("[CN]",serv)+"!!"+db

}

Computed view name

“(xpToDoByCompKey_xp)”

Subject: Thanks…

Thanks a lot it really worked fine…