logo

Undocumented Usefulness

Codestore.net was six years old on Saturday just gone! An event which passed me by until this morning when I accidentally went to the wrong end of this site's "all" view, while sorted by creation date and noticed the significance. Somehow it feels like the sixth birthday isn't as much of an event as the first, second and even the fifth were. Now it's just a number. The next time it might be worth a mention is probably the tenth. Whether it's still around that long remains to be seen. Hopefully so.

Here's one from the Dept. of Undocumentation and thanks to somebody called Michael who happened to leave a comment to a blog post here recently.

We all probably know about the URL command called StartKey but how many of us knew there was also one called UntilKey!?

Why the hell is this not a well-known feature!? Damn it, this could have been so useful in the past on so many occasions. Here's an example of it in use:

/apps/viewform.nsf/($VIMPeople)?OpenView&StartKey=g&UntilKey=j

Note that the UntilKey specified is not included in the results. So, in the above URL, where we're saying show everything until J, it stops at the end of I.

Hopefully I don't need to tell you how useful this could be. It works with XML/DXL too! I just can't believe it's not known about.

While I love learning new things like this it still annoys me that I have to wait for somebody to mention it in passing. Surely there's a better way? Why is not not documented? Is it maybe because undocumented = unsupported = might get dropped in next version?

Anybody else know any more of these useful undocumented features? Pray tell.

Comments

  1. Thanks for sharing!

    Just checked the R6.5.1 designer help and its seems to be documented there :

    "UntilKey is only valid when used with StartKey. It allows you to display the range of view entries beginning with the document specified by StartKey until the document specified by UntilKey. For example, &StartKey=A&UntilKey=B would give you all the entries that start with A. Use the &Count keyword to further limit the number of entries returned within any given range."

    Wonder if it was avaliable in R5 ??

    • avatar
    • Jonathan
    • Tue 12 Sep 2006 04:35 AM

    I just tried in R5, and it works !

    • avatar
    • Jake Howlett
    • Tue 12 Sep 2006 04:37 AM

    Double damn it. Why did I take Michael's word when he said it was undocumented!? Why, not matter how many times I do it, do I not check my facts before blogging!?

    I just checked and you're right - untilkey is mentioned in the URL Commands help page. Which just leaves me wondering why I've never heard about it before.

    • avatar
    • James Harrington
    • Tue 12 Sep 2006 04:49 AM

    I too had no idea this existed, and all the hours I lost without this can never be reclaimed :(

    • avatar
    • jimmy
    • Tue 12 Sep 2006 05:13 AM

    to me it's still new

    • avatar
    • Doug Cohen
    • Tue 12 Sep 2006 06:54 AM

    Like the others, it's new to me as well.

  2. It may be documented somewhere, but it is very useful and I didn't know about it. Thanks for sharing.

  3. RTFE I made the other day. I _DID_ say that it was valid with the ReadViewEntries command but not with the OpenView command in the documentation. So I think I was correct.... so triple damn.

    Any ways, it is very handy as I use it during the incremental searches by concatenating a 'zz' to the StartKey. (easier that incrementing the first character and it works in drill-down/incremental searches).

    Yep I'm the guy from Canada who doesn't have a website. Late hosers.

  4. This reminds me of the ReadDesign view command. For example:

    {Link}

    As far as I know, this one is undocumented; it's not in Designer Help, anyway. In fact, I wasn't aware of it until I recently read an article on developerWorks that included an offhand remark about it. It's identical to ReadViewEntries, except that it returns XML defining the view's design, not its data - namely, the columns and their properties.

    • avatar
    • carcomaidon
    • Tue 12 Sep 2006 08:50 AM

    I used it for my Names Picker along with a XSLT.

    People?ReadViewEntries&StartKey=A&UntilKey=A$

    This grabs people which lastname is A (ONLY A). Instead of A, you can use the "OnKeyUp" event of the field to get what letter the user entered.

    • avatar
    • Partha
    • Tue 12 Sep 2006 09:19 AM

    This one was very useful but as usual undocumented:

    {Link}

  5. Y'know Fight Club, well I think "Michael" is your "imaginary friend" and you convince yourself that you don't know these things and that Michael tells you about them in "Domino Club" (outside of domino club, we don't talk about "Domin Club") and you beat yourself up about not knowing them, when all along you knew about them but felt guilty for not sharing them with us sooner.

    Jeez, I must be having a hard day!

  6. We don't talk about #@&%! club. :)

    OK... I'll bite. Yep it's me with a last name this time. I'm a Canuck who has been using Notes since version 2.0 and now develops solely in Domino. I like keeping Jake on his toes and his head from swelling and I try to avoid going with the crowd whenever possible. I myself could have a few imaginary friends as I don't know who wrote the code in my apps some days.

    I only know Jake like most, through his blog here and have come to value the info that he passes on. Keep up the good work Jake! If my calendar serves me right, it won't be long Jake Jr. comes along and keeps you up at night.

    • avatar
    • Jake Howlett
    • Tue 12 Sep 2006 10:25 AM

    12 weeks and counting Michael...

  7. Wow. That would have been really handy for a number of sticky bits where we all were trying to come up with better ways to get spans of dates from views...

    Great Tip Michael. Thanks for highlighting the usefulness Jake!

  8. OK Folks here comes the gem.... but let me state this from the beginning that these parameters are documented in the ?ReadViewEntries command but not in the ?OpenView command.

    First off, I wasn't happy with the way that ?ReadViewEntries conveniently offered resorting capability on a column and was not an option with the ?OpenView command. I figured that either the ?ReadViewEntries command is building the index on the fly (unlikely) or it's dependent on the column being sorted. Since I don't like the XML output, I decided to try and make those parameters work for the ?OpenView command, so I picked away at it during lunch today.

    Results: You can use the ?OpenView command and specify as a parameter ResortAscending=<column number> or ResortDescending=<column number> if that column is sorted _AND_ has the 'click on column header to sort' property checked. It also works for columns that are categorized and behaves with the response hierarchies.

    Just for clarity, these parameters are in the ?ReadViewEntries command documentation and not in the ?OpenView command documentation. Remember, the column specified for Resorting must be sorted and have the 'click on column header to sort' option checked. There may be more to it, but I was able to repeatedly get the desired results using these parameters.

    I hope you'll find this useful.

  9. Hmmmm... I expected some sort of response like... 'yeah it works for me too', but just crickets here. Maybe a sample is in order:

    Try this http://<yourserver>/names.nsf/Groups?OpenView&ResortDescending=1

    and...

    http://<yourserver>/names.nsf/Groups?OpenView&ResortAscending=1

    • avatar
    • Rod Stauffer
    • Wed 13 Sep 2006 05:34 PM

    If memory serves, "UntilKey" and a few others were added to Domino so that iNotes could function (particularly for Calendar "views" in iNotes). That puts its introduction somewhere midstream in R5. Not sure when it finally appeared in documentation, but it was definitely mentioned in presentations that delved into the design of iNotes and its usage of ReadViewEntries. That history probably explains why "UntilKey" isn't mentioned as an ?OpenView argument.

    For anyone not familiar, with the release of Notes/Domino 6, the iNotes name changed to "Domino Web Access" (quite a while ago now).

    Anyway, since DWA needs "UntilKey", I wouldn't worry about it disappearing.

    - Rod

  10. Hey old man, don't you remember this entry?

    {Link}

    Happy 6!

    .::AleX::.

  11. Jake:

    Happy anniversary ...

    And, best wishes on all the other monumental happenings in your life recently.

    Get plenty of rest now, while you can!

    - Rob

Your Comments

Name:
E-mail:
(optional)
Website:
(optional)
Comment:


About This Page

Written by Jake Howlett on Tue 12 Sep 2006

Share This Page

# ( ) '

Comments

The most recent comments added:

Skip to the comments or add your own.

You can subscribe to an individual RSS feed of comments on this entry.

Let's Get Social


About This Website

CodeStore is all about web development. Concentrating on Lotus Domino, ASP.NET, Flex, SharePoint and all things internet.

Your host is Jake Howlett who runs his own web development company called Rockall Design and is always on the lookout for new and interesting work to do.

You can find me on Twitter and on Linked In.

Read more about this site »

Elsewhere

Here are the external links posted on the same day.

More links are available in the archive »

More Content