Christopher G Mendla commented on Sep 18, 2015

I figured out the reset.

I created a button called 'reset search' and set an onclick javascript of

sessionScope.searchTitle = "";

sessionScope.author = "";

That seems to reset the fields

Christopher G Mendla commented on Sep 18, 2015

Can you clear the sessionscope and/or reset the query

I am having a couple of issues with this. I want to be able to reset the query back to where it clears the searches and shows all records.

It seems that session variables are being set because if I enter an empty query, I get a 500 server error When I try to reload the page I'm stuck on the 500 error. However, if I clear cookies in chrome and go into an incognito window, I can get back to the page.

I'd appreciate any thoughts here.

again, I want to

(1) Clear the search on loading the page

(2) Have a button to reset the search parameters.

thanks

chris

C MAUDIER commented on Apr 3, 2015

Re: XPages View Control - Add Full Text Search

re to Atul Saxena commented on 19 oct. 2012

I doubt any Lotus Notes formula will work. Make a use of *

It's possible, use :

tmpArray[cTerms++] = "(Field Desordre like \"" + "*"+ sessionScope.searchClef +"*"+ "\")";

To reset search use * only like above

For date field use :

tmpArray[cTerms++] = "(Field DateDeclaration = " + sessionScope.searchClef + ")";

Venkatesh Ramasamy commented on Mar 28, 2013

Re: XPages View Control - Add Full Text Search

The Search works great! However, I encountered a problem with documents listed in multiple pages,

I have a view control to set to list 30 rows. I have 80 documents in the view.

I am on page 1, searched for a document in the second page, the results are displayed, with out problems.

Now navigate to second page by clicking the Pager Control.

Search for the same document, the result is blank, however, the pager is enabled with Page 1 as active. When I clicked on Page 1, I could see the search result. Looks like this is to do with the page focus. Is there a way to set the focus search result.

Randal W. Oulton commented on Nov 30, 2012

Re: XPages View Control - Add Full Text Search

FYI everybody, "You can download the completed sample NSF file used in the video"

You can't actually, the link is broken now already, so don't bother trying.

Randal W. Oulton commented on Nov 30, 2012

Corrrected formula

Sorry, no way to edit or delete your comments. Couldn't see video well the first time (no way to zoom) and is cut off on the right on my screen. Ignore the first one I unhelpfully posted. Here is amended formula that he pasted in:

var tmpArray = new Array("");

var cTerms = 0;

if (sessionScope.searchName != null & sessionScope.Name != "") {

tmpArray[cTerms++] = "(Field Name = \"" + sessionScope.searchName + "\")";

}

if (sessionScope.searchCategory != null & sessionScope.Category != "") {

tmpArray[cTerms++] = "(Field Category = \"" + sessionScope.searchCategory + "\")";

}

qstring = tmpArray.join(" AND ").trim();

sessionScope.queryString = qstring;

return qstring

(and has anyone else noticed, that if you touch a single control button on the video, then it breaks the "submit comment" button which becomes non-responsive?

Randal W. Oulton commented on Nov 30, 2012

Re: XPages View Control - Add Full Text Search

To save everyone else typing out the formula he used, here it is so you can just copy and paste (then adjust field names for your use)

var tmpArray = new Array("");

var cTerms = 0;

if (sessionScope.searchFirstName != null & sessionScope.FirstName != "") {

tmpArray(cTerms++) = "(Field FirstName = \"" + sessionScope.searchFirstName + "\"";

}

if (sessionScope.searchLastName != null & sessionScope.LastName != "") {

tmpArray(cTerms++) = "(Field LastName = \"" + sessionScope.searchLastName + "\"";

}

qstring = tmpArray.join(" AND ").trim();

sessionScope.queryString = qstring;

return qstring

Randal W. Oulton commented on Nov 29, 2012

Re: XPages View Control - Add Full Text Search

Gotta say, prolly the best xpages video I've seen in 2 years of watching them. (1) focussed on accomplishing a single task; (2) the verbal instructions are direct, focussed on accompanying that single task, and not rambling off into theory or what if's. Kudo's to the maker of this video.

Atul Saxena commented on Oct 19, 2012

Re: XPages View Control - Add Full Text Search

I doubt any Lotus Notes formula will work. Make a use of *

var query = "(FIELD JobTitle = \"" + sessionScope.searchValue + "\")";

Atul Saxena commented on Oct 19, 2012

Re: XPages View Control - Add Full Text Search

I doubt we can use any formula in search : Alternatively you can make a use of *

var query = "(FIELD JobTitle = \"*" + sessionScope.searchValue + "*\")";

Robert F Harwood commented on Jan 13, 2012

Re: Video: XPages View Control - Add Full Text Search

checked

Dwain A Wuerfel commented on Nov 22, 2011

Re: Video: XPages View Control - Add Full Text Search

I had to use #1 below for my computed search value query rather than #2, but the results are as if I was using #2. The error kept saying unrecognizable query.

#1

var query = "(FIELD JobTitle = \"" + sessionScope.searchValue + "\")";

return query;

#2

var query = "(@Contains(JobTitle;\"" + sessionScope.searchValue + "\")";

return query;

Jim Romaine commented on Jan 7, 2011

Re: Video: XPages View Control - Add Full Text Search - search javascript very helpful

Thanks for the demo. The part of the video describing the search javascript was very useful and what I needed for a current project. (around position #77 according to the video slider, 3/4 through the video).

Anthony W Lucarelli commented on Dec 7, 2010

Video: XPages View Control - Add Full Text Search

How do you clear the search results?

Hilmar Orn commented on Feb 2, 2010

Video: XPages View Control - Add Full Text Search

How do you add a hits counter for the search. To count how many results the search returned.