@ViewTitle in $$SearchTemplateDefault

Background: The @ViewTitle function on a computed field on a $$SearchTemplateDefault does not give you the view name, even though it does work on $$ViewTemplateDefault.

Problem: I’m trying to find the view name when the $$SearchTemplateDefault form is loaded.

I found this guy in the forum had exactly the same problem:

http://www-10.lotus.com/ldd/nd6forum.nsf/55c38d716d632d9b8525689b005ba1c0/3efe46339e849fd885256ffe00486683?OpenDocument

This guy concluded that he’ll pass the view name as a parameter in the URL and extract the view name using @URLQueryString. But that is clearly redundant as the view name is already in the URL:

http://domain/dbname.nsf/ViewName?SearchView&vname=ViewName

Why doesn’t @ViewTitle work in $$SearchTemplateDefault, but it works fine in $$ViewTemplateDefault? Regardless, how do you then get the view name on $$SearchTemplateDefault?

Subject: @ViewTitle in $$SearchTemplateDefault

Didn’t try if this is generally the case or specific to some version yet, but you could always extract the view name from the Query_String or Query_String_Decoded CGI field. This, at least, would not require you to add redundant information.

Subject: RE: @ViewTitle in $$SearchTemplateDefault

I was hoping not to have to resort to the CGI variables in this case as I was hoping there’d be something entirely on the Domino side to tell me the view name.

But I give up. Harkpabst, you’re right. It’s sitting under PATH_INFO. I’ll just extract it out of there. Thanks for your help.

Subject: RE: @ViewTitle in $$SearchTemplateDefault

Oops, sorry. Of course it’s not in the Query_String. Fortunately you knew what I meant to say.