Need help displaying a field on the web

Hi,

This is my first post. I’m trying to display a field containing HTML on the web using LotusScript. So far, I’m not having any luck. I’m probably just leaving out something simple. The field name I’m trying to display is VideoField. I don’t think I need to go to a view to get the infomation, as the field exists on the current document (would that be the UI document, or document.context?). Seems like this should be fairly easy, but I just can’t get it to work.

Any help will be greatly appreciated… thanks!

Here is the code I’m using:

Sub displayVideo(doc As NotesDocument)

On Error Goto errHandling	



Dim sess As New NotesSession

Dim db As NotesDatabase

            Dim videoHTML As String



Set db = sess.CurrentDatabase

videoHTML = VideoField



Exit Sub

errHandling:

Print Err & " - " & Error & " on line " & Erl

Resume Next

End Sub

Subject: need help displaying a field on the web

Hi Steve, You need to get a handle on the document first.

Set doc = sess.documentcontext

doc.videoHTML = doc.VideoField(0)

If your going to try to set the value of this field with lotus script it will probably need to be in an agent that is triggered in the webqueryopen of your form like this:

@command([toolsrunmacro];“webVideoOpen”)

where webVideoOpen is the name of your agent.

But from what I can tell you don’t need to do it this way. You could just make the videoHTML field a computed for display field with “VideoField” as the formula and make sure videoHTML is marked with passthrough HTML.

Hope that helps