Lotus Notes - How to restrict a Person Manager from editing a field

Posted on 2009-02-11
Last Modified: 2013-12-18
I have a customer using a custom 'PO Database'.  It has been in use for a number of years, and the person that wrote it is long gone.  They have come to me with a particular need.

I can usually figure this stuff out, but I'm so far off on this one, I need a finger to point me in the right direction.

Most everyone is setup as an author or editor, and there are some roles defined.  (I don't really know what those roles do yet)

Their problem is that certain fields remain editable even after a PO has been approved.  Now, apparently that is how it was setup, so no big mystery there.  The question is though, how do you change a persons access to a particular field on a form, when they start off having access?  It looks like a form just shows up in different views as it reaches certain stages of approval, so can I lock certain fields to read only when a document is marked completed?

Here is the view selection for 'Completed' which I think just indicates that it isn't one of the mentioned status'  ...not sure if this helps.

SELECT Form = "Document" & Status !="Draft" & Status !="Submitted" & Status != "Paid"

I know this is just a sliver of what you would need to fix this, so again, I'm just looking to be pointed in the right direction.
Question by:ITDharam
    LVL 63

    Accepted Solution

    Use a different form per view or change the access based on the status Field.

    It may be easier to use the view option since you can simply create a new form and change the access of the fields or set them as read only, and when clicked on from the view, that form is used.

    I hope this helps !
    LVL 8

    Author Comment

    So let me make sure I understand.  I can reference the same field from two different forms, and have a separate level of access on the fields for each?
    LVL 46

    Assisted Solution

    by:Sjef Bosman
    So you want to prevent that the value of a field is changed, in certain cases?

    To really do that, you'd have to put that field in a Controlled Access section. In that way, only people who have sufficient rights can modify values in that section. This is a real security measure, because it also works when someone tries to modify the field from an agent or a different form. The document has to be saved first from a form with the CA-section, of course, otherwise the document will never contain the special security section.

    All other solutions are fallible, meaning that someone who is allowed to create and run agents can modify the field without you being able to prevent it.

    There are many options:
    - the multiple form method as described above; it often leads to many very similar forms, hence a maintenance issue
    - the oldest method in the book: use two fields, one Editable and one Computed-for-Display (or one field and computed text) and hide-when formulas to display:
          * the field when the user is allowed to update
          * the Computed-for-Display field when update is disallowed, even if the form is in edit-mode
    - clever coding in the Entering event of the field (don't)
    LVL 8

    Author Closing Comment

    Excellent information, thank you!
    LVL 8

    Author Comment

    Hey, follow up question.  Right now there is a table, with one field in each cell.  I add a new field (computed for display) to the same cell, however, when I use the 'Hide paragraph if formula is true' it applies that to both fields in that cell.  Can I disable that?
    LVL 46

    Expert Comment

    by:Sjef Bosman
    Make sure both fields are in separate paragraphs. A carriage return (Enter) between the two will do.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    This is an old article, please see an updated version of this article, located here:
    Notes Document Link used by IBM Notes is a link file which aids in the sharing of links to documents in email and webpages. The posts describe the importance and steps to create a Lotus Notes NDL file in brief.
    how to add IIS SMTP to handle application/Scanner relays into office 365.
    This video discusses moving either the default database or any database to a new volume.

    758 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

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now