Domino ReadViewEntries agent

Posted by Simes at 1:57 pm
Mar 092007

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!

5 Responses to “Domino ReadViewEntries agent”

  1. Dude,

    Check out the source as you have it posted. I think your getting your escaped entity refs rendered as the relavent char.

    So you get

    Case “&”: outputStr = outputStr & “&”

    which is stoopid ;)

  2. Yes. I blame the web.

  3. It’s got a lot to answer for. ;)

  4. Actually, I think you can dodge this problem by using LDAP. On one of my client sites, the server handles the LDAP call, so the user doesn’t need rights. I think. I did it last year and some engineers set up the LDAP while I just did the code…

  5. That’s an interesting angle and one I hadn’t thought of, although I don’t know if my current client is set up for LDAP. Given that there are now at least two address books to look stuff up from for any given app, maybe they should be.

Sorry, the comment form is closed at this time.

© 2011 simes dot org Suffusion theme by Sayontan Sinha