How to find the current design field existed in current UI doc?

Hi,I am using uidoc.fieldsettext(“fieldName_” + cstr(n), teststring) in the loop to set data on fields, the total of fields in the form are limited. So in order to avoid “Notes Error - Cannot locate field” message, I need to check if the current field is existed in current uidoc, if it is not existed, then I do not need to use fieldsettext,

Anybody has any ideas how to check it before set the text value?

Something like hasitem, but it is not uidoc .

Thanks

Subject: Try this…

Here’s some additional to demonstrate how you can check for the existence of a field by checking the backend document represented by uidoc.

Dim Doc As NotesDocument

Dim FieldName As String

Set Doc = uidoc.Document

…Begin Loop…

FieldName = “fieldName_” + cstr(n)

If Doc.HasItem(FieldName) Then

Call uidoc.fieldsettext(FieldName, teststring) 

End If

…End Loop…

Hope this helps.

Alex