Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How can I update current field with Lotus Scripts

Posted on 2000-05-09
4
Medium Priority
?
331 Views
Last Modified: 2013-12-18
When Initialize form I want to calculate the value of field in this form with Lotus Script ? But I can't do it now . My form is the $$ViewTemplate for viewname and I open it on web .I want to use the Lotus Scripts to make the dynamic webpage.
My Domino server is release 4.63
and this is my sample code

I use this code on field name ViewList
Sub Initialize
     Dim uidoc As NotesUIDocument
     Dim  doc As NotesDocument
     Set doc = uidoc.Document
     Call doc.ReplaceitemValue("ViewList","Hello")
     Call doc.save(True,False)
     Call uidoc.reload
End Sub

I want to show all of view in this database
to be the link on web .I want to know how can I update this field via Lotus Script?

Thanks you for your kindness
MAC
So sorry my engligh isn't good enough
0
Comment
Question by:mackrub
4 Comments
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 2792284
Hi MAC

You can use the domino $$Viewlist field to list available views in the database.


Good Luck
~Hemanth
0
 

Expert Comment

by:sam_clayton
ID: 2792449
Which event is driving this code?
Remember that for the web the only events triggered for a form are WebqueryOpen and WebQueryClose (and these can only call agents)
Therefore these events IIRC will not allow you to manipulate uidoc data.
0
 
LVL 4

Accepted Solution

by:
stamp earned 400 total points
ID: 2794100
Hi  mackrub,

if you want to fill a form field by LotusScript on web, than you can do it only by usin background objects not UI objects.

You can not run any field LotusScript code. You have to move the code to an agent.
This agent can  fiel fields before display to browser and after submiting from browser.
I have transformed your UI LotusScript code into one background agent called by WebQueryOpen event.

Create one shared agent with option: "Run once (@Commands may.."
This is Initialize event:
Sub Initialize
      Dim s As New NotesSession
      Dim doc As NotesDocument
      Set doc = s.DocumentContext
      doc.ViewList = "Hello"
End Sub

That means: after assaigning DocumentContext to a doc, you can assign any value to any field like this:
                doc.AnyField = "AnyValue"

But this all is not necessary! HemanthaKumar is right. Place anywhere into your form named "$$ViewTemplateDefault" a field named "$$Viewlist"
This is enough to get the complete list of all views (clickable!).

Regards,
stamp
0
 

Author Comment

by:mackrub
ID: 2857446
Answer accepted
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Problem "Can you help me recover my changes?  I double-clicked the attachment, made changes, and then hit Save before closing it.  But when I try to re-open it, my changes are missing!"    Solution This solution opens the Outlook Secure Temp Fold…
This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

972 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question