Administrators and designers alike commonly assume @Formula language does not permit to define Authors, Readers or Names fields within forms or subforms. This document demonstrates such is false and documents how you can achieve such.
It happens design misses are discovered during staging or production phases, When such problems occur designers, but sometimes administrators too, generally resort to LotusScript to create Authors, Readers or Names fields in order to quickly fix editor or reader access failures.
Assume a fictitious « Person » form misses a « grantedReaders » field to function properly. First thing is to fix this faulty form with the appropriate field and associated values. While future documents will function appropriately, previously created documents are fixed as follows :
1. Create a new form called « fix | Person » simply holding the missing field plus its default/computed values.
2. Create a « fix » view listing all Person documents but displaying the newly created « fix » aliased form. Make sure that view holds a column detailing « grantedReaders » information, although not required this column will illustrate @Formula magic.
3. Create an new agent running @Command([ToolsRefreshSelectedDocs]) on selected documents
.. and you're almost done
Select Person documents created in the past and run the agent. Once refreshed, « fix » view makes newly created values visible. You can make sure recalculated Person documents hold adequate SUMMARY and READER_NAMES fields selecting document property.
LotusScript can also do it quite the same way
Jérôme Deniau | 7/6/2008 1:05:37 PM ET
No-one seems to have notice it but since ND7, you just have to use NotesDocument.ComputeWithForm method(True,False), which was not the case in preceeding releases.
So if you change a field from Text to Author in your form the NotesDocument.ComputeWithForm(True,False) will change the Text type field to Author type field. The content - of course - need to match Domino security rules, but it is the same for the Formula stuff.
If you want to get rid of the item.IsAuthor calls, you need to chack the Domino or Notes release Build before.