This is a multipart message in MIME format.
--
[ Picked text/plain from multipart/alternative ]
If I understand correctly, you want to call your agent and pass info from
the form to the agent.  If this is the case, here is how I do it.  You can
add the values from the form the url that is calling the agent. ie:
@Return("[http://www.mysite.com/wardweb.nsf/PasswordRecover?OpenAgent&"+
Userid + "&" + EmailAddress +"&"+ CustName + "]")
In this case, only three fields are passed to the agent with '&'
separating each value.  Since this will be sent as one long value, the
agent will need to break it up at the '&', like so:
        On Error Resume Next
        server$ = "server"
        dbfile$ = "mydb.nsf"
        Dim db As New NotesDatabase( server$, dbfile$ )
        Dim view As NotesView
        Dim doc As NotesDocument
        Dim docMail As NotesDocument
        Dim compdate As Variant
        Dim rtitem As NotesRichTextItem
        Dim status As String
        Set session = New NotesSession
        Set view = db.GetView("User List")
        Set docweb = session.DocumentContext
        'Set docForm = view.GetFirstDocument
        Set docMail = New NotesDocument(db)
        Set rtitem = New NotesRichTextItem(docMail, "Body" )
        URLString = docweb.Query_String(0)
        URLLength = Len(URLString)

'**********************************************************************
'  Get the User ID         *
'**********************************************************************
        ParamPosition = Instr(URLString,"&") + 1
        ParamStop = Instr(ParamPosition, URLString, "&")
        ParamLen = (ParamStop - ParamPosition)
        username = Mid(URLString, ParamPosition,        ParamLen)

'**********************************************************************
'  Get the E-Mail Address     *
'**********************************************************************
        ParamPosition = (ParamStop + 1)
        ParamStop = Instr(ParamPosition, URLString, "&")
        If ParamStop = 0 Then
                ParmContinue = 0
                ParamLen = (URLLength - ParamPosition) + 1
        Else
                ParmContinue = 1
                ParamLen = (ParamStop - ParamPosition)
        End If
        email = Mid(URLString, ParamPosition,   ParamLen)

'**********************************************************************
'  Get the Company Name *
'**********************************************************************
        ParamPosition = (ParamStop + 1)
        ParamStop = Instr(ParamPosition, URLString, "&")
        If ParamStop = 0 Then
                ParmContinue = 0
                ParamLen = (URLLength - ParamPosition) + 1
        Else
                ParmContinue = 1
                ParamLen = (ParamStop - ParamPosition)
        End If
        company = Mid(URLString, ParamPosition,         ParamLen)

Hope this helps.
-JS





clib@gptruck.com
Sent by: domino400-admin@midrange.com
06/26/2002 09:09 AM
Please respond to domino400


        To:     domino400@midrange.com
        cc:
        Subject:        Retrieving form data from an agent



When working with forms, how is it possible to send a form's data to an
agent instead of storing it and redirecting to a view? We're working on a
web-based application that will use the data from a standard form to do a
few database lookups on a remote AS400 server running DB2 -- we currently
use ODBC from within LotusScript inside of an agent to interface with the
database. The problem, though, is figuring out how to retrieve form data
from that agent. We do not want to store any of the form's information in
the Notes database.

So far, I've written the greater majority of the necessary ODBC code in a
shared agent, and running the agent itself (i.e.,
http://host/database.nsf/MyAgent?OpenAgent) works fine -- its just a matter
of getting form data. I've tried using a button (a regular form button --
not an action button) that sends the user to the agent and using
Doc.FieldGetText("FieldName"), which gave me a type mismatch error.

Any ideas?

Much thanks in advance,
Brian Cline


_______________________________________________
This is the Lotus Domino on the iSeries / AS400 (DOMINO400) mailing list
To post a message email: DOMINO400@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/domino400
or email: DOMINO400-request@midrange.com
Before posting, please take a moment to review the archives
at http://archive.midrange.com/domino400.





As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.