Customize the Search Form

Hi experts,

I'm trying to customize the searchform in a database available on the web.
I have a questions about that !!!
I have made a $$SearchTemplateDefault that's giving me the result of the search (that's working fine). Now i want to make a customized Inputform ($$Search), but i don't know how to do this, because when i made this form with a field on it, i don't know how to give the command to start the search with the information from this field.

Thanks in advance !!!
LVL 1
oosterbaanAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
AntonysinghConnect With a Mentor Commented:
Hi,

In your search form have a field to get input say "In_Field".

Create the following fields with field type text and Computed and make it hidden always.
Query , $$Return

In Query field you have to form a search query and pass it to $$Return field.
Ex:
In Query field's default value, you should have like this

varname := @If(In_Field != "" ; "[Srarching_Field_name] ="+ In_Field ; "");

In $$Return field default value, wirte formula like this,

DBName:=@Subset(@DbName;-1);
"[[/"+DBName+"/SrarchViewName?Searchview&Query="+Query+"&SearchOrder="+@Text(Sort)+"&SearchMax="+@Text(MaxResults)+"&SearchWV="+@If(ExactMatch="";"TRUE";"FALSE")+"&SearchThesaurus="+@If(UseThesaurus="";"FALSE";"TRUE")+"]]"

Here,

SearchViewName is the view containg the documents to be searched.

If you want to search using multiple fields, you can modify the Query field and pass it to the $$Return field.

Good Luck,

Regards,
Antony.
0
All Courses

From novice to tech pro — start learning today.