Solved

How can I update current field with Lotus Scripts

Posted on 2000-05-09
4
317 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 100 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
I thought it will be a good idea to make a post as it will help in case someone else faces these issues. I trust this gives an idea how each entry in Notes.ini can mean a lot for the Domino Server to be functioning properly. This article discusses t…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

785 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