Home > Ask the Domino Experts > Questions & Answers > How can I make fields editable by some users, but not by others?
Ask The Domino Expert: Questions & Answers
EMAIL THIS

How can I make fields editable by some users, but not by others?

Andre Guirard EXPERT RESPONSE FROM: Andre Guirard

Pose a Question
Other Domino Categories
Meet all Domino Experts
Become an Expert for this site
>
QUESTION POSED ON: 19 March 2004
Hi, I am an absolute novice at Notes dev, so please bear with me. We have a little system in which fields are filled in and then the form is "sent" to someone else for approval. The fields are set as text editable, but then when the next person views the document, the info needs to be seen but not editable. Thanks for any help.

>
There are many ways to do this. Here's an often-used method that I usually prefer.

Place the fields that you want to be conditionally editable inside of an access-controlled section. The section editors formula can use the fields on the form and information about the user to calculate whether the person viewing the document is allowed to edit the document.

For instance, let's suppose that you want to only allow the user who submitted the form to edit these fields, and then only until the form is submitted. You have a field named Submitter, Computed When Composed that contains the Notes name of the user who composed the form (formula: @UserName). Another field, Status, tells whether the document has been submitted or approved. It has four possible values: Draft, Submitted, Approved or Rejected. If the form is in Draft or Rejected status, the submitting user may edit the fields; if not, no one may edit them.

In this case, you could select the type of the section editors formula as "Computed for display" so that it will be recalculated every time the document is opened. The formula could be:

@If(Status = "Draft" : "Rejected"; 
Submitter; "-nobody-") 
In other words, if the status is Draft or Rejected, the person whose name is in the Submitter field may exit here; otherwise, nobody can. (There is nothing special about the value -nobody- -- you can use any string that you know doesn't match the name of any user or group). If the formula returns "" or "*", anybody can edit that section.

Section editor formulas often return a role name such as "[Admin]" instead of or in addition to a username. Remember if you are using multiple values, to create a list using the ":" operator, not "+". For example:

Submitter : "[Admin]"
not
Submitter + "[Admin]" 
to allow the submitter and everyone in the [Admin] role to edit.

One caveat: Controlled access sections are not a security feature. A determined and knowledgeable user can change the value of any field in any document that they have access to edit. If you need to be certain that only certain users can change the document, use Authors fields to limit access to certain users.

If you don't want the expand/collapse the functionality of a section, set the section to be expanded in all modes, and use the hide tab of the section properties to hide the section header. This has the effect of locking it open. (The hide properties in the section dialog apply only to the header line, not to the section contents, but if the header is hidden the user has no way to open the section.)

Do you have comments on this Ask the Expert Q&A? Let us know.


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary



Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice



Lotus Notes Domino on Blackberry and mobile devices
HomeTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersDomino IT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 1999 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts