Solved

How can I update current field with Lotus Scripts

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

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…
  In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

863 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

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now