Use LotusScript to obtain the value of multi-Value Domains

Source: Internet
Author: User

Principle: The domain values in this document are in the array format. The value of the multi-value field is similar to the array of one row and multiple columns. The subscript starts from 0.
Assume that the domain name is Employee and the type is multi-value text field. In this document, the value of this field is james, robin, and alfred.
The returned value of LS is jamesw.alfred.
Method 1: directly obtain
StrEmployee = doc. Employee (0) + doc. Employee (1) + doc. Employee (2)
Method 2: Use Evaluate to declare
Dim strEmployee As Variant
Const NotesMacro $ = "@ Implode (Employee )"
StrEmployee = Evaluate (NotesMacro $, doc)
Msgbox Cstr (strEmployee (0 ))
Method 3: Use the GetItemValue Method
Dim itmEmployee As Variant
ItmEmployee = doc. GetItemValue ("Employee ")
Forall o In itmEmployee
Msgbox Cstr (o)
End Forall
Method 4: Convert to Array Processing
Dim I, j As Integer
I = 0
ArrEmployee = doc. GetItemValue ("Employee ")
For j = Lbound (arrEmployee) To Ubound (arrEmployee)
Msgbox Cstr (arrEmployee (I ))
I = I + 1
Next

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.