$ViewTitle in $$SearchTemplateDefault

Season greetings!That was already asked here but not a single solution was given. This wondering me if it is possible at all…

How to know which view is now in the $$SearchTemplateDefault?

Asked 3 years ago here http://www-10.lotus.com/ldd/46dom.nsf/55c38d716d632d9b8525689b005ba1c0/497395739efd4b4d85256c0e006e84d8?OpenDocument&Highlight=0,%24%24SearchTemplateDefault

Someone could ask - What is the purpose?

  • Let’s say we want to export to Excel every view we have in our web db.

Using the technique described by Jack Hewlett here http://www.codestore.net/store.nsf/unid/EPSD-5VBS6Y?OpenDocument we can do it with a view which name is a known one. With some very simple improvement we can force domino calculate this viewname on the fly (this depends on the @ViewTitle formula that works in $$ViewTemplateDefault and parsing query string in .iqy form), but when search results are being displayed in $$SearchTemplateDefault @ViewTitle doesn’t work, so we must use $$SearchTemplate for viewname and the pass already known for sure viewname to .iqy form. This is not very good programming practice as we should each time create a new form for a new search, in the HTML source for the $$SearchTemplateDefault, though, there is actually info about the view search results were getting from, for example

I’ve searched for CGI variable that would allow get this entire string (something like HTTP_This) but no luck.

So the question (How to know which view is now in the $$SearchTemplateDefault?) seems for me to be a great deal easier that the answer.

Subject: $ViewTitle in $$SearchTemplateDefault

In the URL… somewhere… is encoded either the name of the view, or the UniqueID of the view.You might be able to use a WebQueryOpen agent, and a calculated when created field or two on the $$SEarchTemplateDefault document to snag the view in a LotusScript by it’s UniqueID, then use that to get the name of the view & place that in a 2nd field on the form… and use that in formulae to put the view title on the document.

I haven’t done this… it’s just a theory of where to start.

Subject: RE: $ViewTitle in $$SearchTemplateDefault

Thank you for a reply Todd!These were also my thoughts but finally I’ve stopped at the following:

I use viewname parameter on a search form and then parse it with @urlquerystring.

Hope this helps sometime someone.