How to access the Notes item in this way?

Hi, I have a notes document which has 15 notes items such as: ItemSize_1, ItemSize_2,ItemSize_15. I need to check each value in this 15 items by using for loop,

Instead of hard code the item name, I tried this:

for i = 1 to 15

if uidoc.document.ItemSize_+i() = “IBM” then

Messagebox “blah blah”

Exit for

end if

end for

Of course, this code ItemSize_+i() does not work, how to make it working?

Subject: How to access the Notes item in this way?

Use the FieldGetText method of the NotesUIDocumnet class, and pass a concatenated value as the first argument.

Also, since Lotusscript is a strongly typed language, you need to convert i to a string before concatenating using the + operator, or you could use an ampersand tyo avoid having to do that. However, explicitly converting the variable is slightly faster, as far as I understand, and thus recommended, especially in a large loop.

Subject: How to access the Notes item in this way?

First i isn’t an array, so don’t address it as i()

Here is the solution from a previous posting in this forum

Subject: RE: How to access the Notes item in this way?

thanks lot , it works as charm.