Creating Multiple Output Formats

As shown in the previous test drive, Querying with Numeric Property Operators, you can create forms and query scripts that put many useful features of Index Server at the disposal of users. In this test drive, you will see how a single query form can allow the user to select different result formats.

Exercise 1

  1. Open the Advquery.asp file in your preferred text editor.
  2. Search for ColChoice.
  3. Change the value from 1 to 3, and save the file.
  4. The line of code should now look like this:

    
    <INPUT TYPE="HIDDEN" NAME="ColChoice" VALUE="3">
    
  5. With the Sample Query form (Advanced ASP Query Form) still showing in your browser, click your browser's Refresh button.
  6. In the Enter your query below field, type Index Server.
  7. In the Modified list, select in the last year.
  8. Click the Execute button.
  9. You should see a result set that displays the following information: The record number, the file name, the URL to the document, the size of the file, and the last modification date and time.

  10. Click the Clear button.

Exercise 2

  1. Open the Advquery.asp file in your preferred text editor.
  2. Search for ColChoice.
  3. Change the value from 3 to 2, and save the file.
  4. The line of code should now look like this:

    
    <INPUT TYPE="HIDDEN" NAME="ColChoice" VALUE="2">
    
  5. With the Sample Query form (Advanced ASP Query Form) still showing in your browser, click your browser's Refresh button.
  6. In the Enter your query below field, type Index Server.
  7. In the Modified list, select in the last year.
  8. Click the Execute button.
  9. The query results show the physical path to each file matching the search, with a link to the file.

  10. Click the path of one of the files to open it.

When you selected the different output formats (ColChoice), the form actually referenced different output templates in the form-data and query script. A single query form can reference several different output templates to show different sets of data in different formats. So, an administrator could give users customized views, such as a table view sorted by author or modification date, or a conventional record view similar to the Index Server standard result set.

With Index Server you can create a set of query forms and a set of output templates, and have them interoperate with each other to give customized queries and result views. The template forms can be programmed to remember which query form called them so that the a link such as the New Query link in the Simple Content Query form returns the user to the previous form.


© 1997 by Microsoft Corporation. All rights reserved.