Subject: 2nd Post - Lookup using LotusScript in Web Agent
I aplogize for reposting - I just figured if I had reposted I would get a response that ask me question about my code instead of how I am running the code. In any event thanks I found the answer.
Subject: 2nd Post - Lookup using LotusScript in Web Agent
I assume your problem is getting GetDocumentByKey to work? Make sure that “Troin Artis” appears in the first column of the (uname) view, and that the column is sorted. It won’t work if the column is displaying hierarchical names–you must use the Common Username.
I’ve always had trouble getting this method right, so I tend to use db.Search to create a “collection” of one document and work with that.
Note, however, that it’s not certain that your lookup datase and lookup view are being accessed successfully. Your agent is going to print “ldb is working” and “lview is working” whether those lines of code worked or not. These would be better tests: