Architecture & Performance Competencies

Posted on
Share on Google+Share on LinkedInShare on FacebookShare on RedditTweet about this on TwitterEmail this to someone

Questions derived from the 737 – IBM Lotus Notes Domino 7 Using LotusScript in IBM Lotus Domino 7 Applications Self Test Software Practice Test.

 

Objective: Application Architecture and Performance Competencies
SubObjective: Using extended class syntax

Item Number: 737.2.16.3
Single Answer, Multiple Choice

 

Consider the following code in a form action:

 

Dim s As New NotesSession
Dim ws As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim doc As NotesDocument
Set uidoc = ws.CurrentDocument
Set doc = uidoc.Document
***Missing Code***

 

The Dept field is a single-value field on the form containing the value “Marketing”. Which of the following statements could replace the “***Missing Code***” line of the given code and display the message “Department = Marketing”?

 

 

  1. Msgbox(“Department = ” & doc.Dept(0))
  2. Msgbox(“Department = ” & doc.GetItemValue(“Dept”)(0))
  3. Msgbox(“Department = ” & uidoc.FieldGetText(“Dept”))
  4. All of the above

 

Answer:
D. All of the above

 

Tutorial:
The NotesDocument extended class syntax uses dot (period) notation to access a NotesDocument item as if it were a property of the NotesDocument class. Extended class syntax works only with the backend NotesDocument class and not with the NotesUIDocument class.

 

To access a NotesDocument item/field using extended class syntax, the item is treated as a variant. So assigning a string value requires the use of a subscript.

 

The GetItemValue method on the NotesDocument class returns an array of strings for the specified item/field, requiring the use of a subscript.

 

The FieldGetText method on the NotesUIDocument class returns a string for the specified item/field.

 

Reference:
1. Domino Designer 7 Help – search on: Extended class syntax

 

2. Programming Guide Volume 2 – LotusScript/COM/OLE Classes – Chapters 1 and 2 http://doc.notes.net/uafiles.nsf/docs/DESIGNER70/$File/prog2.pdf

Share on Google+Share on LinkedInShare on FacebookShare on RedditTweet about this on TwitterEmail this to someone
cmadmin

ABOUT THE AUTHOR

Posted in Archive|

Comment:

Leave a comment

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>