There is less classic Domino work around then there used to be ( Pure Java, mobile and Xpages taking up most of my time), but still plenty of maintenance work for those who can provide what the client wants, any way, this is something I just updated on an existing clients classic app, and it struck me that it MUST be known by just about every one, but either no one has blogged it, or my Google foo is weak at the moment, so I decided to post it in case I might be of some use.
Problem: you have a classic search form, and you want to analyse or work with the results (making totals or stuff like that), but need to somehow get hold of the values in order to do so, I can remember this being a complete PITA years ago, but with a fresh set of eyes its dead easy.
1) Make your searching view a HTML one (via the view properties).
2) Make a column that returns a hidden field for each row for the value(s) that you want to access.
3) Now when you search, you can go a fetch all these values with client side java script.
and do what ever you want with them.
Now that lacked a bit description wise, so here is a demo and working download for you to take to bits
DownLoad: You can get the file Here
update: Matt White has pointed out that this produces invald HMTL (working but invalid), and suggests using a JS framework and doing the same sort of “find” but using a CSS Class name… a fine point
##### Mark(07/06/2012 16:24:22 GDT)
Does that mean you are making a separate search call? rather than a local bit of JS dealing with the data you already have? if you were wanting to total a value for the items the existing search had returned how would you be doing that in the context of a $$search form?
##### Mark Barton(07/06/2012 15:59:29 GDT)
Yes – rather than HTML in the search view columns just construct JSON data, or am I missing something?
##### Mark Barton(07/06/2012 15:28:30 GDT)
Couldn’t you just return JSON?
##### Mark(07/06/2012 15:31:32 GDT)
as part of the search form data?