gkidd
gkidd

Reputation: 199

How to fill a combobox with many values from different database?

I've tried with @DbColumn but I get Infinity, this is my current code:

var dbName:NotesDatabase = session.getDatabase("the server", "the database.nsf");
var v:NotesView = dbName.getView("the view").getColumnValues(0);
return v;

But this returns about a hundred results and after that I get distorted text, hieroglyphs, values in different lines etc.

A screenshot of the values:

I've never seen anything like this before

Now what? Thank you very much!

Upvotes: 0

Views: 1272

Answers (1)

Richard Schwartz
Richard Schwartz

Reputation: 14628

This is something of a guess because I'm not an XPages guy, but it looks to me like you're saying:

var v:NotesView

And then

return v;

So this means you are declaring that v is a NotesView object. You're actually assigning the columnValues, but the data type is wrong and there is apparently no type-checking going on. So then you return v, and it is being treated as a NotesView object instead of as an array of string values.

Perhaps this is what you need:

var v:NotesView = dbName.getView("the view");
return v.getColumnValues(0);

Upvotes: 3

Related Questions