Domino 9 und frühere Versionen > ND6: Entwicklung

readers field doesn't works properly ?

<< < (3/5) > >>

Semeaphoros:
No, with LS you have to supply the canonical form of the name yourself, this translation is done in the UI.

You can do the following within LS:


dim namTemp As NotesName

set namTemp = New NotesName ( "username/Department/Organisation" )

print namTemp.canonical

to convert from abbreviated to canonical with LS

Toma Bogdan:

--- Zitat von: Semeaphoros am 09.06.04 - 08:07:00 ---No, with LS you have to supply the canonical form of the name yourself, this translation is done in the UI.

You can do the following within LS:


dim namTemp As NotesName

set namTemp = New NotesName ( "username/Department/Organisation" )

print namTemp.canonical

to convert from abbreviated to canonical with LS


--- Ende Zitat ---
it is exactly that I said before your last reply: to modify the actual values from abbreviated to canonical with a LS agent.

Hernan Cortez:
it should be a good idea to work with item class. Item class has properties like isReaders and some such.

Toma Bogdan:

--- Zitat von: El Indio Mapuche am 09.06.04 - 09:47:20 ---it should be a good idea to work with item class. Item class has properties like isReaders and some such.

--- Ende Zitat ---
is it necessary to set
--- Code: ---note.IsReaders=True
--- Ende Code ---
after I have modified the readers field with the LS agent (even the field is READERS by default) ?

Toma Bogdan:

--- Zitat von: Semeaphoros am 08.06.04 - 19:30:35 ---Yes, usually it does, if you don't overwrite that behaviour, and hence it is saved as canonical and not abbreviated. But it does not, if you fill the fields directly in the backend-document by LotusScript

--- Ende Zitat ---

I have used the canonical values but the behaviour is the same. The users that are in that readers field can't see the doc.
here is the code for updating the readers field:

--- Code: ---   While Not(note Is Nothing)
      Limits=Ubound (note.Reviewers)
      Redim Preserve New_values(Limits) As String
      For i=0 To Limits
         New_values(i)=note.Reviewers(i)
         Set curent_CN = New NotesName(New_values(i))
         name=curent_CN.abbreviated
         ' I perform a search into the employee db to get the full name based on abbreviated name
         Set employee_doc = view.GetDocumentByKey (name)
         If Not (employee_doc Is Nothing) Then
            If employee_doc.form(0) = "Job" Then
               Set full_name=New NotesName(employee_doc.name_CN(0))
            Else
               Messagebox("Can't be found" & name)
            End If
            
            New_values(i)=full_name.canonical
         End If      
         
      Next
      note.Reviewers=New_values
      Dim item As NotesItem
      Set item = note.GetFirstItem( "Reviewers" )
      item.IsReaders=True
      Call note.Save(True,False)
      Set note = collection.GetNextDocument(note)
   Wend
--- Ende Code ---

Navigation

[0] Themen-Index

[#] Nächste Seite

[*] Vorherige Sete

Zur normalen Ansicht wechseln