Hi
I need to know with LS if a field exists. I saw that with HasItem I can do it, but I need to know with Front-End document. is there some equivalent?, somebody can help me with any idea?
Thanks a lot. Regards.
Hi
I need to know with LS if a field exists. I saw that with HasItem I can do it, but I need to know with Front-End document. is there some equivalent?, somebody can help me with any idea?
Thanks a lot. Regards.
Subject: HasItem method equivalent on NotesUIDocument
You could declare a global variable in the form declarations and set this in the Initialize or onLoad form events
Dim fieldexists as Boolean
Dim ws as new notesuiworkspace
Dim uidoc as notesuidocument
Set uidoc = ws.currentdocument
if uidoc.Document.HasItem(“FieldName”) then
fieldexists = true;
end if
Then test for the value of fieldexists before doing whatever it is you want to do
Alternatively you could use uidoc.fieldGetText(“FieldName”). Off the top of my head I can’t remember if this throws an error if the field does not exist. If it does you could check for the error in which case you know that the field does not exist on the document.
Subject: RE: HasItem method equivalent on NotesUIDocument
Thanks a lot Matt. Regards.