How to get field value from a form into an agent?

Hi all!

I must be a complete idiot, but how do I get a field value from a form into an LS agent? I want to have a value from a field into a string to perform a SQL search. I don´t want to save the form to a document, I just want the value. I´ve tried Evaluate with @GetField and FieldGetText but it just won´t work… Anyone plz :slight_smile:

Subject: How to get field value from a form into an agent?

Depends on how you run the agent. Do you open the form, fill in fields, and press a button or something to run the agent? If so, the NotesUIDocument class and FieldGetText should work. What’s the code you’re using?

Subject: RE: How to get field value from a form into an agent?

Yes, I run the agent from a form on the web. I tried with NotesUIDocument with FieldGetText but i didn´t work… I obviously do someting wrong but i don´t know what. I´ll supply the code when I get back to work (it´s late here in Sweden…)

/Henrik

Subject: RE: How to get field value from a form into an agent?

this is the code i tried:

Dim w As New NotesUIWorkspace

Dim uidoc As NotesUIDocument

Dim pnr As String

Set uidoc = w.CurrentDocument

pnr = uidoc.FieldGetText( “f_pnr” )

but I suspecy that this doesn´t work with web forms?

/Henrik