FP2000: How to Filter Information From a Database Results Component Based on the NT Logon

ID: Q232367


The information in this article applies to:


SUMMARY

Microsoft Technical Support will not resolve problems produced by editing the HTML that FrontPage generates. This HTML Code sample is provided as a convenience for authors seeking to extend the capabilities of FrontPage. For more information about writing HTML, please see the following Microsoft Web site:

http://www.microsoft.com/workshop/c-frame.htm#/workshop/author/default.asp

WARNING: ANY USE BY YOU OF THE HTML PROVIDED IN THIS ARTICLE IS AT YOUR OWN RISK. Microsoft provides this HTML "as is" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.



When you create a form in FrontPage 2000 that saves results to a database, one of the additional fields that is saved is the User_name field. The User_name field is populated with the user's Windows NT logon ID, assuming that the site it is located on a Web server with "Allow Anonymous" disabled.

When you retrieve data from the database, the User_name is displayed as one of the returned fields for each record. However, it is not easy to use the FrontPage interface to add the Windows NT Logon as a filtering criteria.

To work around this limitation, modify the FrontPage generated HTML slightly.


MORE INFORMATION

If you have a Web that stores the User_Name field in a database, the following example will allow you to use the Windows NT logon as filter criteria:

  1. Create a new page, and insert a Database Results component.


  2. Select the database, click Next, select the table, click Next.


  3. Click More Options, and click Criteria, then click Add.


  4. Select the User_name field, and make sure that Use this Search Form Field is selected. Leave each of the other options on this dialog box with their default values.


  5. Click OK three times, and click Next twice to complete the insertion of the database results component.


  6. Switch to the HTML view for the page.


  7. Find the following tag:
    
    <input TYPE="TEXT" NAME="User_name" VALUE="<%=Request("User_name")%>" size="20"> 
    and replace it with the following:
    
    <input TYPE="HIDDEN" NAME="User_name" VALUE="<%=Request.Servervariables("LOGON_USER")%>" size="20"> 


  8. Switch to the Normal view, right-click Reset, and click Cut.
    Right-click Submit, and click Form Field Properties. In the Value/Label box type Click to Update. Click OK.


  9. Save the page, and use the Preview In Browser command.

    When you click Click to Update, the records pertaining to the current user are returned.


Additional query words: front page


Keywords          : kbdta kbFrontPage kbGrpDSO 
Version           : WINDOWS:
Platform          : WINDOWS 
Issue type        : kbinfo 

Last Reviewed: August 5, 1999