Readers field problem

I have a readers computed field. Why is my formula not working? The field shows the right name but the doc still allows others to edit it. Thanks…

@If(status = “Pending”; mgr; Author)

Subject: readers field problem

Readers fields don’t prevent editing of documents; they prevent viewing of them. If you’re trying to prevent anyone other than the person listed in mgr from editing the document if the status is Pending, you probably want an Authors field instead. However, these only modify existing author access - anyone with Editor or higher access to the database will be able to edit it. There are hacks that will let you get around it; you can put code in the QueryModeChange of the document that will prevent the document from being put into Edit mode if the criteria aren’t met.

Subject: RE: readers field problem

Ooops, sorry, I meant to say Authors field!

I can’t seem to get the code right without using roles.

What do I use for the Author field to work here?

@If(Status = “Approved”; SCApproval;Author)

Subject: RE: readers field problem

That code should work, ASSUMING that everyone has Author access to the database. If your users have Editor access or higher, it’s not going to make a difference.

Subject: RE: readers field problem

They have person group, author - just no private agents, java agents, or lotusscript agents. All over boxes are checked.

The fields shows the right name but users that have access to the controlled sections can still edit the top fields not in their section.

For instance, one user that has access to the controlled section can still edit the doc, well his section but the fields above should not open to be edited. Once the doc goes approved, he is not in the authors field, so why are the fields still available for him to edit?

Subject: RE: readers field problem

Try this:

@Name([Canonicalize];@If(Status = “Approved”;SCApproval;Author))

Subject: RE: readers field problem

That is very true. Both rader and author access fields person’s need to be in hierarchical canonicalize format. If the names in the author and other field are not in hierarchical format, @name([Canonicalize] will not change them to hierarchical. So first check out first that names in those ScApproval and Author fields are in hierarchical format and then use that format Schwarz suggested.

Subject: RE: readers field problem

I’m not really sure how to do this.

I’ve set the one field to your suggestions:

@Name([Canonicalize];@If(Status = “Approved”;SCApproval;Author))

So is this correct? I have the author field set to ( computed when composed ):

@Name([Canonicalize]; @UserName)

To show that field, I have:

@Name([CN]; Author)


I’m not sure about the SCApproval field since it’s an @DBLookup. How do include this?

a := @DbLookup(“”; “”; “viewname”; field1; “field4”);

@If(@IsError(a); @Return(“”); a)

For the value of the @dblookup, I have the input translation set to this: @Name([Canonicalize];job1)