Using "Form Formula" from search results

Hello, all!

I’m just wondering the best way to do this. I’ve tried many. Here’s how it works:

  1. Do a search, so www.server.com/path/db.nsf/view?SearchView&Form=x&Query=searchstuff

  2. I have a “$$SearchTemplateDefault” which properly displays the results.

  3. I want the results to open with the “x” form (from the URL).

I’ve tried ‘@URLQueryString(“Form”)’ in the form formula as well as many other things.

I can’t set then use a cookie (although that works). =8(

Any help would be greatly appreciated.

Thanks!

Steve in NYC

“It hurts to be on the cutting edge.”

Subject: Using “Form Formula” from search results

A form formula needs to compute to a text string that matches a form name or form alias name in your database. Since you are passing the name of the form on the query string, change your Form Formula to this:

@UrlQueryString(“Form”);

Subject: Using “Form Formula” from search results

Build a separate view with the same selection formula as the view you really want to search (so it has the same documents), give it a form formula, and search that view.

Subject: RE: Using “Form Formula” from search results

Howdy!

Thanks! I’m trying to avoid adding an extra 2000 views. =8P Ideally, I’d like the Form Formula of the search results view give me the form name and parameters to go into the form to show only certain data.

Wishing too much, y’think?

Thanks!

Steve in NYC

Subject: RE: Using “Form Formula” from search results

You are passing the form name to use on the URL to the view, not the links in the $$SearchTemplate. What URL do the view results launch. You would need to use a javascript function I think. So the links column in your searchview would have to be something like:

“” + columnValue + “”

function opendoc(unid)

{

var formToUse = myGetFormFromURL()

window.location = someURLCrap + “/0/” + docunid + “?open&FORM=” + formToUSe;

}

If you get the idea, unless thats what your doing.

Simon