Solved

Document locking basics

Posted on 2006-06-20
4
301 Views
Last Modified: 2013-12-18
Hi, this is hopefully the last problem for a while (famous last words!), and hopefully fairly simple.  The Notes help is not particularly helpful on this (or anything for that matter).  If I use @DocLock ([LOCK]) in a button formula and set the database properties to allow locking, who gets locked out when the button is pressed?  Everyone but the author?  And does it only work while the document is open for editing?  I know this feature is meant to prevent replication conflicts, but what I want to do is to lock all the fields in the form against editing once a final button is pressed (the button also closes the form - I've done that bit already).  When the document is reopened, only those people in a specific role ([SysAdmin]) will have edit access.  Everyone else including the author can only view.  I don't think @Doclock is the way to do that, since it doesn't seem to be working (and I suspect that is only works while a document is open for editing).  Can you recommend a simple formula (rather than Script) way to do this.  Thanks!  Maggie  nb, if this turns out to be more complicated than I think it will be, I'll put up the points.  
0
Comment
Question by:maggieball
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 46

Accepted Solution

by:
Sjef Bosman earned 50 total points
ID: 16949162
You're right, that's not locking, that's Author rights. You need at least 1000 lines of LotusScript to ...

Kidding. What you need is what's called Authors fields. An Authors-field contains the names of people who can edit a document. Those people must already have Author-rights in the ACL. People not mentioned won't get edit access, unless they have Editor or higher access to the database.

I advise you to use two Authors-fields:
- a field Authors with the people allowed to edit while the document has status Open; the contents of this field may change during the lifetime of the document
- a computed (when composed) field AuthorsInternal, that contains only the role [SysAdmin]

The default formula for the Authors-field could be
    @UserName
0
 

Author Comment

by:maggieball
ID: 16956392
Thanks sjef, and good joke (I almost believed you after the last question)!  I've got an author field already (with @Username as the default). Just let me clarify what you're suggesting.  I add another computed author field that contains the role [SysAdmin].  Then I add another field for status which defaults to "Open" but changes when the button is pressed to "Closed".  How do I get the second one to override the first when when the status changes?  Wouldn't it be better to add the status field but just have one computed author field with an @If formula like this: @If(Status = "Open"; @UserName; "[SysAdmin]")?

The only problem with that is that I also want to limit access to those with edit (not just author) access to the database.  Perhaps (and I apologise for thinking outloud here) I could just use a role for author access rather than @UserName and include all potential editors in that role and just limit edit access to those who I want in the SysAdmin role.  That would probably work wouldn't it?  Thanks again!  I know this is basic stuff.  Maggie
0
 

Author Comment

by:maggieball
ID: 16956437
Actually doing it that way I wouldn't even need the "[SysAdmin]" role in the authornames field since they would be the only ones with edit access from the NAB and that would give them edit access even if the author field is blank.  So the formula would be @If(status = "Open"; @Name([Canonicalize]; @UserName : "[RptEditors]"; "").  Is that right?  Anyway I've accepted the answer, because I wasn't even thinking about using the authornames field for this, and of course that is the solution, which you've pointed me in the direction of.  Thanks again.  Maggie

0
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 16957809
If you want to limit Editors in their rights, you have several ways open:
- add some LotusScript to the QueryOpen event, that will prevent unauthorized people from opening the document (can be bypassed)
- add a Readers-field in which their name isn't present (they won't even see the document)
- make them Authors... (as you found out yourself!)

Normally (by my definition), in an operational database, there are
- 2 or 3 Managers
- 0 to 2 Designers (better use a template, and an approval mechanism so a Manager knows the design has changed)
- 1 to 2 Editors per office, who can correct or adapt whenever required
- the users have Author rights
- 0 Readers or Depositors

Last tip: one Authors-field is doable, I still prefer two. One Readers-field is asking for trouble, because when it has the wrong values nobody might get access to the document anymore! I always have two Authors and/or two Readers fields, one of them computed, with the role "[Manager]" in it. A server would then need this role to be able to replicate all documents. Without that role in a Readers field, it won't even see the document.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

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

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Invoke VBA from lotusscript after mailmerge 11 249
Lotus notes email code 13 101
Lotus notes email code 2 131
Email Forward: Get Around Relay Issue 3 130
Problem "Can you help me recover my changes?  I double-clicked the attachment, made changes, and then hit Save before closing it.  But when I try to re-open it, my changes are missing!"    Solution This solution opens the Outlook Secure Temp Fold…
Article by: Rob
Notes 8.5 Archiving Steps and Tips This article covers setting up a Notes archive, and helps understand some of the menu choices making setting up and maintaining a Notes archive file easier.
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.
Suggested Courses

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question