I need help with a very rare item

The problem is the next,

An external program (BCC_MailProtect) creates a new field in the documents, i can see that field and its value in the document properties of the lotus client, but i can’t access it with lotusScritp, is more, in the debugger that item doesn’t appear. Any idea?

This is how i see the item in notes client:

Field Name: VerificationResult

Data Type: Text

Data Length: 691 bytes

Seq Num: 1

Dup Item ID: 0

Field Flags:

"BCC_MailProtect Security Information


This message …bla bla"

An in designter, I have tried all that methods even more and nothing:

doc.GetFirstItem( “VerificationResult” )

doc.GetItemValue( “VerificationResult” )

doc.FieldGetText( “VerificationResult” )

doc.GetObject( “VerificationResult” )

@GetField(“VerificationResult”)

Subject: I need help with a very rare item

When you say you can see the field value in the document, is that after you open the document or on the view level with the document selected.

Is it possible that the field is computed and only exist after the document is open?

Subject: RE: I need help with a very rare item

Raymond is right.

Your LS code is accessing the backend document, whilst the client is showing you the UI document values.

If you can, try changing your code to access the UI document instead, and see if you can grad the value from there.

Subject: RE: I need help with a very rare item

I had tried with the next code:

Dim workspace As New NotesUIWorkspace

Dim uidoc As NotesUIDocument

Dim composed As String

Dim myfield As String

myfield="VerificationResult"

Set uidoc = workspace.CurrentDocument

composed = uidoc.FieldGetText( myfield )  

And i get: “Notes Error: Cannot locate field”

And with all the fiels that the external program created, happen the same (I see the fields in the properties in views and with the document is opened, and with code i can’t access them).

And some of them have the “field flags” empty and others with “SUMMARY” so i don’t think the field flags was the problem.

Any more ideas?

Thanks anyway

Subject: You need to consider UIDoc/Doc and Summary/Non Summary fields

Notes stores data on document

there may be many items on that document containg data of diffrent type(Number text etc)

when you use the propertied mechanism you are seeing directly to the items on that document

however and whenver they were created

Notes displays a document using a form (which one depends on circumstances) but there is always a form

a form has fields on it …

if you get the UIDOc handle and use FieldGetText( “Fieldname”) and there is NO corresponding field on the form

it will FAIL as you’ve found

This is true even if there is an ITEM on the document with the required name

so all you need to do is IGNORE the form (as accessed via the UIDOC)

and use the Document to access the items

Try something like this

(code not compiled or tested … just use it as a guide)


Dim workspace As New NotesUIWorkspace

Dim uidoc As NotesUIDocument

Dim composed As String

Dim doc as NotesDocument

Dim itm as NotesItem

Dim myfield As String

myfield=“VerificationResult”

Set uidoc = workspace.CurrentDocument

set doc = uidoc.document

set itm = doc.GetFirstItem( myfield )

if Not itm is Nothing then

composed = itm.Text

end if


as to the Field flags “SUMMARY”

thats a bit complicated.

basically an item without a SUMMARY flag cannot be used in a view column

In normal circumstances only RICH Text items are non-Summary

other items whether Text, or Number or Time are nrmally summary

however even these types can be non summary

especially if created in complex circumstances e.g. a mail router fromoutside domino

However you can still get at the content in Lotus Script as above

Note: this extract from DEsigner Help may show a bit more about summary


ISSUMMARY PROPERTY

Read-write. Indicates whether an item contains summary or non-summary data.

Defined in

NotesItem

Data type

Boolean

Syntax

To get: flag = notesItem.IsSummary

To set: notesItem.IsSummary = flag

Legal values

True indicates that the item contains summary data.

False indicates that the item contains non-summary data.

Usage

Items are flagged as containing summary or non-summary data. Summary data can appear in views and folders; non-summary data cannot. In general, items created through the UI are tagged as non-summary if they contain rich text or are very long.

When you create a new item using New, the IsSummary property for the item is False. If you want the item to appear in views and folders, you must explicitly change its IsSummary property to True.

When you create a new item using AppendItemValue in NotesDocument, ReplaceItemValue in NotesDocument, or the extended class syntax, the IsSummary property for the item is True. If you don’t want the item to appear in views and folders, you must change its IsSummary property to False.

You can enable or disable the appearance of an existing item in views and folders by changing its IsSummary property.

An item whose IsSummary property is True may not appear as expected in views and folders if the data is not suitable. For example, a rich text item whose IsSummary property is True generally appears as a question mark.

Subject: Plase confirm that the Field Flags

are blank.

IIRC text items they should show SUMMARY

which may explain some of your difficulties