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 ...............