Sometimes when you’re working on a Domino web app, you need a NAB picker to help your users fill in name fields. At such times, you scour the web because you know that clever people like Scott Good and Matt White are out there and have probably done it already. And you find that they have, and you grab that code and use it. And it’s all fine for intranet sites.
And then, as happened to me this week, you find that you need to use your name picker with a NAB that normal users are not allowed to read, such as corporate sites which face the Internet. The picker I’m using, Scott’s, based on Matt’s, uses ReadViewEntries to get its data. Without user-level access to the NAB, it doesn’t work.
So, ideally, in this situation, what you need is an agent which can be run from the web and does essentially the same thing as a call to ReadViewEntries, because that way you can use the same name picker at the front end. And that, dear reader, is what I present to you today.
Again, the first thing you do in this kind of situation is hit Google to see if anyone’s done it already. And so this code is mostly from an agent at Vince Dimascio’s site which presents Full-Text Search results in a ReadViewEntries-like form. All I did was pull out the FTSearch stuff and put in support for start, count and startkey values. I’m quite pleased with the end result, though – it’s pretty nippy, certainly still fast enough for the typeahead lookup to work.
Source is here. Enjoy!