Lotus Notes FAQ Visit Our Sponsor!

How do you refer to CGI variables in a $$Query*Agent?

If you'd like to operate on a CGI variable in your agent, you must include a text field that is named the same as the CGI variable on your form. You can then use "Session.DocumentContext" in your $$QueryOpenAgent or $$QuerySaveAgent to access the CGI variable like so:

  Dim session As New NotesSession
  Dim context As NotesDocument
  Set context = session.DocumentContext
  Print "HTTP_User_Agent = " & context.HTTP_User_Agent(0)

This will display the web browser being used.

Applies to Notes Versions: 4, 4.5, 4.6, 5
Last Modified: September 8, 1999