I am doing a search query on a viewPanel. When the results get displayed in the view, I want to loop through only the returned results and build an array of names for each row. I have the Name field in the first column of my Xpage view. I have tried the following:
var viewControl = getComponent("namesPanel");
var view = viewControl.getDataModel().getDominoViewData().getDataObject();
var entries = view.getAllEntries();
var entry = entries.getFirstEntry();
var namesArray = [];
while(entry)
{
namesArray.push(entry.getColumnValues().elementAt(0));
entry = entries.getNextEntry();
}
getComponent("DisplayNames").setValue(namesArray);
The above code returns every name in the backend Notes view regardless of my search query. I realize there is getAllEntriesByKey(), but my Xpages view is filtered by a search, not by column values.
Is there a way I can build an array of column values on only the displayed results in my view after a search? Thanks for any tips.