Question

I create a document in the backend with a periodic agent in LotusScript. Now I need to set one field to field type "formula" but I found just a way to set the field type to "author", "reader" or "names" with

Set notesItem = New NotesItem(notesDocument, name$, value [, specialType% ])

Is there a trick how I can do it?

Was it helpful?

Solution

One way to do this would be to put your field on a new blank document that you make a copy of when you want to use it via your backend code. Same idea as a template. The field would be left at the type you require. You would just need to change the means of how you compose the document. Since you are possibly looking at using a template doc you might add other fields to your template as well.

OTHER TIPS

Why do you want to set the field type to 'Formula'? I don't this type is accessible from LotusScript.

Notes determins the field type automatically, e.g.:

  • doc.replaceItemValue( "datefield", now()) will create a DateTime field
  • doc.replaceItemValue( "numberfield", 23 ) will create a Number
    field

Authors, Readers etc. can be set on the item; NotesItem.IsAuthors = True or the short form, where you can create the field and se tthe type in one line:

  • doc.ReplaceItemValue( "NameField", session.username ).IsNames = true
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top