java - View.getView() returns null -
i'm trying find folder or view in database. named team documents folder has filter option by date, by category. returns me null folder exists.
string dbserver = "d23dbm95/23/a/ibm", dbfilename = "dbom\\farizan\\stsklb1.nsf"; public void runnotes() { session session = null; database db = null; view view = null; document doc = null; try { notesthread.sinitthread(); session = notesfactory.createsession(); system.out.println("user = " + session.getusername()); db = session.getdatabase(dbserver, dbfilename); if(db.isopen()) { system.out.println("title "+db.gettitle()); view = db.getview("team documents \\ date"); if(view == null) { system.out.println("still null"); } } } catch(notesexception e) { e.printstacktrace(); } } i tried fill getview() method team documents. still returns null. approach problem?
while have been more helpful if had included link screenshot of domino designer client's folder list, best guess have 2 folders, not 1 folder "filter options". also, guess "team documents" not folder; it's prefix on folder names makes them appear nested in parent folder.
if that's case, need
iew = db.getview("team documents\\by category"); or
iew = db.getview("team documents\\by date"); note: no spaces before & after backslashes.
if assumptions above not correct, suggestion assign alias names folders in domino designer , use aliases instead of display names in code. frankly, that's always practice, because allows code continue working if decide change display names.
Comments
Post a Comment