< Back

Document Subject: Xpages Dbcolumn for listbox
Hint Short Cut: Add this to your code & documentation to help you find this page.
http://#xpageListbox or http://A555F9/nn.nsf/ByAlias/xpageListbox

Code snippet to put a dbcolumn into a xpages listbox choices




This grabs the first 3 entries from the view "Companies" column 1.

NB This is XPages Javascript not standard Lotus Notes @Function.

Listbox Values -> Add Formula Item  -> JavaScript (ServerSide) ->  Compute On Page Load

r=@DbColumn(@DbName(), "Companies", 1);
if(@IsError(r))
{
"error"+@Text(r)
}
else
{
@Subset(@DbColumn(@DbName(), "Companies",1),3)
}