To Infinity and Xpages

Had a client call regarding an xpage application which had been working for quite some time but had stopped. The piece that kicked off this puzzle was that in a combo box where the options you could select were fed from an @Formula lookup on a DOMINO view simply said “Infinity”. Mmmm that can’t be right. So after looking through the code and the underlying views I realized that it had to be something about the lookup that was causing the problem.  A quick search later confirmed the issue as shown here and the code was changed in favour of some server side javascript

var lookupView:NotesView = database.getView(“<LOOKUPVIEW>”);

where the <lookupview> is replaced with the name of your view – and in this case the first column has the values needed and so  zero is the correct index number.

Thinking about the issue I realized the problem had inadvertently been created by the client being able to add new entries through the notes client (rather than the xpages app) which contributed to the size of the returned value of the  @dblookup growing past its limit.