Manage Learn to apply best practices and optimize your operations.

Cycling Through A Sequential Group Of Fields.

If you have a large set of fields, each sequentially numbered (e.g. Field1,
Field2, Field3, etc.), you can use LotusScript to easily cycle through all of
them. By using a for loop, and NotesUIDocument.FieldGetText() (or
NotesDocument.GetItemValue(), or GetFirstItem()), running the same algorithm(s)
on each of the fields can be far more efficient and maintainable.
JavaScript/Java can also be used just as easily. Below is an example of the
LotusScript code you would use:
Sub manipulateFields()
'*** Variable Declarations ***
Dim intCounter As Integer
Dim intHighestField As Integer

Dim strFieldValue As String

Dim uiws As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
'*** End Variable Declarations ***

Set uidoc = uiws.CurrentDocument

intHighestField = 15 ' The highest numbered field.

For intCounter = 1 To intHighestField
strFieldValue = uidoc.FieldGetText("Field" & Cstr(intCounter))
' Act upon the field value in some way:
'...
Call uidoc.FieldSetText("Field" & Cstr(intCounter), strFieldValue)
Next
End Sub

Dig Deeper on Lotus Notes Domino Administration Tools

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchWindowsServer

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchDataCenter

SearchContentManagement

Close