Solved

How can I update current field with Lotus Scripts

Posted on 2000-05-09
4
325 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

Lack of Storage capacity is a common problem that exists in every field of life. Here we are taking the case of Lotus Notes Emails, as we all know that we are totally depend on e-communication i.e. Emails. This article is fully dedicated to resolvin…
Notes Document Link used by IBM Notes is a link file which aids in the sharing of links to documents in email and webpages. The posts describe the importance and steps to create a Lotus Notes NDL file in brief.
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses

628 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