2
votes

My xpage for creating an excel file is:

  <?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core" rendered="false">
    <xp:this.afterRenderResponse><![CDATA[#{javascript: 

// some conditions

qstring = tmpArray.join(" AND ").trim(); 
sessionScope.queryString = qstring; 
myView.FTSearch(qstring);

var vec:NotesViewEntryCollection = myView.getAllEntries()



// some code for write

// some code

</xp:view>

what I noticed: for example if I let all the input fields blank, the excel file should contain all the documents saved in my XPiNC application, but it just redirect me to a blank xpage : ( http://domain/XB.nsf/export_hidden.xsp ).

I also use a FTsearch modulo within another button, but the search ( letting all the input fields blank ) is as expected, it works: it displays all the documents via a viewpanel.

I appreciate your time.

1

1 Answers

3
votes

If all search fields are empty then you don't need to execute FTSearch(). myView.getAllEntries() will still work and return all documents in view without calling FTSearch().

...
if (cTerms > 0) {
    qstring = tmpArray.join(" AND ").trim(); 
    sessionScope.queryString = qstring; 
    myView.FTSearch(qstring);
}

var vec:NotesViewEntryCollection = myView.getAllEntries();
...