What is the idea of learning LotusScript?

Source: Internet
Author: User
Assume that we need to take the value of the first document in a view as the value of a field...
It is well known. Use Doc. Field (0) to retrieve
Your problem is how to get the doc here...
Let's analyze ....

This is because BS is developed. You cannot use the UI class. So we only look at the yellow class... (And eventually all will be back to the top class notessession)

Because Doc belongs to notesdocument. Therefore, in the above Class Object legend, we found notesdocuemts.
Then, find the class about view at the upper level according to the arrow... (DIM doc as notesdocument)

Found .. Is notesview. (Dim view as notesview)

Then find the class at the upper level... found notesdatebase. (DIM dB as notesdatabase)

Next, we found the top class notessession (DIM session as new notessession)

Then. According to the machine explanation. From top to bottom. We define .....

Dim session as new notessession
Dim dB as notesdatabase
Dim view as notesview
Dim doc as notesdocument

Okay. We have all defined
Next, we need to initialize each variable with a defined type.
The attribute syntax (currentdatabase) after each variable allows you to view the help of the class where the current initial variable is located.

Set DB = session. currentdatabase
Set view = dB. getview ("view name ")
Set Doc = view. getfirstdocument

OK. All initial tasks are completed...
Now you can use Doc.
TMP = Doc. Field (0)
Msgbox TMP

The explanation is complete. Hope you can understand ..............
Very hard to write. Sorry for your conscience .... Open the page in disigner, such .... We can see the structure of the class.
A layer-by-layer definition can be done ...............

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.