2. How to Choose Fields to Query on


If the form is simple, then you have to fill in the input box on the right of the descriptive term of the field.
Just select the input box with the mouse and write the term you are searching for, like in the LIVE example below.

Surname
Name
Department

Here you can inspect the .fmt file, while the relevant part of this form source code is here:

<FORM METHOD=POST ACTION="/htbin/SFgate">
<INPUT NAME="database" TYPE="hidden" VALUE="local//usr/local/wais-sources/phonebook/phone">

<CENTER>
<TABLE BORDER WIDTH=70%>
   <TR><TH align=left>Surname</TH><TD><INPUT TYPE="text" NAME="surname" VALUE="saggin" SIZE=40></TD>
        <TD><SELECT NAME="name_tie">
              <OPTION>and
              <OPTION>or
            </SELECT></TD></TR>
   <TR><TH align=left>Name</TH><TD><INPUT TYPE="text" NAME="name" SIZE=40></TD>
        <TD><SELECT NAME="department_tie">
              <OPTION>and
              <OPTION SELECTED>or
            </SELECT></TD></TR>
   <TR><TH align=left>Department</TH><TD><INPUT TYPE="text" NAME="department" SIZE=40></TD></TR>
</TABLE>
</CENTER>

<P>

<CENTER>
<TABLE>
<TR><TH><INPUT TYPE="submit" VALUE="Start Search">
</TH><TH> </TH><TH>
<INPUT TYPE="reset"  VALUE="Reset Query"></TR>
</TABLE>
</CENTER>

<INPUT TYPE="hidden" NAME="tieinternal" VALUE="and">
<INPUT TYPE="hidden" NAME="application" VALUE="phone">
<INPUT TYPE="hidden" NAME="directget" VALUE="1">
<INPUT TYPE="hidden" NAME="convert" VALUE="Table">
<INPUT TYPE="hidden" NAME="maxhits" VALUE="30">
</FORM>


When the form allows the field selection at the running time, the descriptive name of the field to be searched for can be selected clicking with the mouse on the the arrow in the square box at the right of the default descriptive term.
A drop-down list of available fields appears.


If you want you can test this possibility using the LIVE example reported below.

Here you can inspect the .fmt file, while the relevant part of this form source code is here:

<FORM METHOD=POST ACTION="/htbin/SFgate">
<INPUT NAME="database" TYPE="hidden" VALUE="phone_attribute">
<CENTER>
<TABLE BORDER WIDTH=70%>
    <TR><TD><SELECT NAME="fieldsel_1_description">
            <OPTION SELECTED>Surname
            <OPTION>Name
            <OPTION>Department
          </SELECT></TD>
    <TD><INPUT TYPE="text" NAME="fieldsel_1_content" VALUE="saggin" SIZE=40></TD>
 
          <TD><SELECT NAME="fieldsel_1_tie">
            <OPTION>and
            <OPTION>or
          </SELECT></TD></TR>

    <TR><TD><SELECT NAME="fieldsel_2_description">
            <OPTION>Surname
            <OPTION SELECTED>Name
            <OPTION>Department
          </SELECT></TD>

    <TD><INPUT TYPE="text" NAME="fieldsel_2_content" SIZE=40></TD></TR>
</TABLE>
</CENTER>

<INPUT TYPE="hidden" NAME="fieldsel_name_surname" VALUE="Surname">
<INPUT TYPE="hidden" NAME="fieldsel_name_name" VALUE="Name">
<INPUT TYPE="hidden" NAME="fieldsel_name_department" VALUE="Department">

<P>

<CENTER>
<TABLE>
<TR><TH><INPUT TYPE="submit" VALUE="Start Search">
</TH><TH> </TH><TH>
<INPUT TYPE="reset"  VALUE="Reset Query"></TR>
</TABLE>
</CENTER>

<INPUT TYPE="hidden" NAME="tieinternal" VALUE="and">
<INPUT TYPE="hidden" NAME="application" VALUE="phone">
<INPUT TYPE="hidden" NAME="convert" VALUE="Table">
<INPUT TYPE="hidden" NAME="attributes" VALUE="1">
<INPUT TYPE="hidden" NAME="lattice" VALUE="phone_lattice">
<INPUT TYPE="hidden" NAME="maxhits" VALUE="30">
<INPUT TYPE="hidden" NAME="directget" VALUE="1">
</FORM>

The relevant part that allows to map a description name for each field is the following:

<INPUT TYPE="hidden" NAME="fieldsel_name_surname" VALUE="Surname">
<INPUT TYPE="hidden" NAME="fieldsel_name_name" VALUE="Name">
<INPUT TYPE="hidden" NAME="fieldsel_name_department" VALUE="Department">

Please take into account the fact that this example is complicated by the Heterogeneous databases condition whose description is in the document How to Query Heterogeneous Databases?.


If you have a "checkbox" form, then you can make your choices by clicking with the mouse inside one or more square(s) near to the selected term(s).
If you want you can test this possibility using the LIVE example reported below.

MODE OF INHERITANCE
Autosomal Dominant X-linked Dominant Polygenic
Autosomal Recessive X-linked Recessive Unknown
Mitochondrial

Here you can inspect the .fmt file, while the relevant part of this form source code is here:

<FORM METHOD=POST ACTION="/htbin/SFgate">
<INPUT NAME="database" TYPE="hidden" VALUE="local//usr/local/wais-sources/tutorial/audio">
<CENTER>
  <TABLE BORDER WIDTH="70%">
    <TR><TH ALIGN=center COLSPAN=3><FONT SIZE=+2>MODE OF INHERITANCE</FONT></TH></TR>
    <TR><TH ALIGN=left><INPUT TYPE="checkbox" CHECKED NAME="inheritance_content" VALUE="dominant"> 
                              Autosomal Dominant</TD>
        <TH ALIGN=left><INPUT TYPE="checkbox" NAME="inheritance_content" VALUE="x-linked_dominant"> 
                              X-linked Dominant</TD>
        <TH ALIGN=left><INPUT TYPE="checkbox" NAME="inheritance_content" VALUE="polygenic"> 
                              Polygenic</TD></TR>
        <TR><TH ALIGN=left><INPUT TYPE="checkbox" NAME="inheritance_content" VALUE="recessive"> 
                               Autosomal Recessive</TD>
        <TH ALIGN=left><INPUT TYPE="checkbox" NAME="inheritance_content" VALUE="x-linked_recessive"> 
                                X-linked Recessive</TD>
        <TH ALIGN=left><INPUT TYPE="checkbox" NAME="inheritance_content" VALUE="unknown"> 
                                Unknown</TD></TR>
        <TR><TH ALIGN=left><INPUT TYPE="checkbox" NAME="inheritance_content" VALUE="mitochondrial">
                                  Mitochondrial</TD></TR>
     </TABLE>
</CENTER>
<P>
<CENTER>

<TABLE>
<TR><TH><INPUT TYPE="submit" VALUE="Start Search"></TH>
<TH> </TH>
<TH><INPUT TYPE="reset"  VALUE="Reset Query"></TH></TR>
</TABLE>
</CENTER>

<INPUT TYPE="hidden" NAME="tieinternal" VALUE="or">
<INPUT TYPE="hidden" NAME="listenv" VALUE="table">
<INPUT TYPE="hidden" NAME="range" VALUE="1">
<INPUT TYPE="hidden" NAME="convert" VALUE="Table">
<INPUT TYPE="hidden" NAME="maxhits" VALUE="30">
<INPUT TYPE="hidden" NAME="directget" VALUE="1">
</FORM>



THIS PAGE REFERENCES:
© 1996-97 BioPD - University of Padova - Author: Leopoldo Saggin
Mail to: lsaggin@civ.bio.unipd.it - Last Revision: August 21, 1997
Tested on Netscape 1.22 and higher