• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 664
  • Last Modified:

Lotus Notes: Question on Readers and Authors

On lotus notes, how do I update a readers or authors field so that someone with an acl role of admin can get into the document. I tried updating an existing document that I have access to with ([Admin]), then having another person with admin access it but she still cannot see on the view.

I expect to put this in the author field later, but for now have been experimenting with readers while leaving my name in author so I don't lock myself out of the document.

0
BillTr
Asked:
BillTr
  • 3
  • 2
1 Solution
 
Bill-HansonCommented:
Here's some things to check:

1.  Make sure your Readers field is set to "Allow multiple values".
2.  Make sure the entry in the Readers field is "[Admin]" (check case and brackets).
3.  If the database is used on a local machine, make sure that "Enforce a consistant ACL across all replicas" is enabled.



0
 
marilyngCommented:
also, make sure the ROLE of [Admin] is listed in the ACL, and is checked off for you.  

I use a names field for default readers that I hide at the top of the form:  otherReaders, names, multiple value, formula "[Admin]":"[LocalDomainServers]".

If I have other calculations to do that involve adding or removing people, I add another names field on the form.

At the bottom of the form I put a computed Readers field, allow multiple values, formula:
@Unique(@Trim(OtherReaders)):@Unique(@Name([Canonical];theOtherNamesField)).

Most people just add the reader's field with default roles in it.
0
 
BillTrAuthor Commented:
I will want to addin different users based on how the form is filled out. So, using this approach, would I be correct in thinking that I'd have 3 fields.
#1. Otherreaders as per your formula to pull in all admins
#2. SpecialReaders, names, multiple values
#3.Then pull these 2 into the computed readers field somehow?

The list of possible readers is going to be fairly dynamic. I was planning on coding lotus script to handle this in Querysave where I would derive the readers and concatenate that with "[Admin]" and update the readers field. Is this a poor approach? I tend to default to scripting, but in this case I though it necessary because I have to read other documents to derive the readers.

Thanks!
0
Learn to develop an Android App

Want to increase your earning potential in 2018? Pad your resume with app building experience. Learn how with this hands-on course.

 
marilyngCommented:
Billtr, no it is not impossible, nor is it a poor approach to dynamically create the readers field via lotus script.  However, it is a bit difficult.  If Bill-hanson's approach doesn't work for you, which uses the computed field on the save event, then you just have to be aware of the fact that the reader's field is not automatically instantiated as a reader's field, unless you include the special type parameter.  

You also have to check if it exists first, and if it is of type, READERS, if not, correct it and save.

When last I had to do this in a complicated workflow, I set about constructing a visio model of events that I needed to track in order to set the reader's field.  Then I did the whole thing in a massive script library.

Be sure to read the Item class carefully, along with all the options.
0
 
Bill-HansonCommented:
When I need to dynamically adjust my document security via LotusScript, I will normally just modify the AdditionalAuthors or AdditionalReaders fields (see my link above) then I call NotesDocument.ComputeWithForm.  That way, I'm just working with text arrays and I never have to worry about setting any fields to type READERS.  Also, having one Readers and one Authors field per document makes my life much easier, allowing me to write reusable hide formulas.

Another approach that I use is to add more fields to the DocAuthors and DocReaders formulas (like WorkflowAuthors and WorkflowReaders).  That way I can write process code that is separate from the application design.  Separating your design and process is usually a good idea.

For example, DocAuthors would look like this...

authors := @Trim(@Unique(
      DefaultAuthors :
      AdditionalAuthors :
      WorkflowAuthors :
      AuthorRoles
));
authors

... and DocReaders would look like this...

readers := @Trim(@Unique(
      DocAuthors :
      DefaultReaders :
      ReaderRoles :
      AdditionalReaders :
      WorkflowReaders
));
@If(
      ReaderRoles != ""; readers;
      AdditionalReaders != ""; readers;
      WorkflowReaders != ""; readers;
      "")

... Using this method, your security model can become as complex as you need it to be.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now