Link to home
Start Free TrialLog in
Avatar of janineo
janineoFlag for United Kingdom of Great Britain and Northern Ireland

asked on

How do I display a Lotus Script variable within a browser?

Hello,

I am working in Lotus notes and have the following problem.

I have a Lotus Notes form. On initialize I have my own custom dll that I pass a parameter into which returns a URL. I call it using the following lotuscript (which all seems to work):

Dim myObj
Dim strInput As String
Dim strReturn As String

strInput = "test input string"
Set myObj=CreateObject("MyDLLName.clMain")
strReturn = myObj.EncryptMe(strInput, True)	

Open in new window


I now need to display this URL to the user. I have created a field on the form called Field1. In the onload event for the form I have added the following code:

Sub Onload(Source As Notesuidocument)
	Source.EditMode=True
	Call Source.FieldSetText("field1","1")
	Source.Save
End Sub

Open in new window


Here is the problem - opening this form in Notes shows my URL being displayed correctly. However, opening the form via a web browser does not display my URL. I have read a few articles saying that Notesuidocument is not supported on browsers, but how can I get around this and display the value of the returned variable online?

Thanks for reading!
ASKER CERTIFIED SOLUTION
Avatar of Sjef Bosman
Sjef Bosman
Flag of France image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
As another posibility to get a lotus agent to run on a document.
Have the form redirect to another URL if a field is not set that could be the encrypted data.
Redirect to agent using xx.nsf/agentx?openagent&docid=yyyyyyyyyy  etc
The agent can then run lotus script to get value, run the ddl and save back to linked document, and finally use print command to create a html document that reopens the original document.
Original doc now has value in field so opens normally ?
To avoid Save prompts, put it on the form as a Computed for Display field
Note the wording for the agent: WebQueryOpen

That means the agent is run BEFORE the document is passed to the web rendering engine.

For more info: Open up designer help (I have link to the nsf readuily available since i am used to that interface as opposed to eclipse style help)
click on index, type "webq"

expand subject by typing * (Asterisk)  read articles.
Avatar of janineo

ASKER

Thankyou for the help.