How to make computed field editable?

Posted on 2004-11-29
Last Modified: 2013-12-18
I have a form and there are some fields on this form. There is a names computed field called adminperson. The formula for this field :
tmp:= @If(Department="Accounts"; "Ryan/abc_corp";Department="Application";"Brad/abc_corp";Department="Sales Admin";"Ryan/abc_corp";Department="Network Systems";"Ryan/abc_corp";Department="Admin";"Ben/abc_corp";Department="Special/Account Project";"Tom/abc_corp";"");

When the form is being created, User will enter an employee id and it will display the employee name, office, department in their respective fields and it will also display the admin person in charge name in the adminperson field of this employee id based on his/her department.

I like to make the field adminperson to be editable in case the person in charge in the adminperson field is not in, user can assign another person to be in charge of his request.

How do I make the field to be editable(Form will always load the person-in-charge name after user entered employee id)?
Please advise.
THank you.
Question by:kopibean
    LVL 19

    Expert Comment

    created and editable field upto the computed.
    And hide it; !@isMember(@userroles;"[Admin]")
    and for computed, @isMember(@userroles;"[Admin]")

    So, whenever Admin edits this doc, he will see editable field. Editable field name say, field1

    for computed field add this formulae:
    I assume, your formulae works:
    tmp:= @If(Department="Accounts"; "Ryan/abc_corp";Department="Application";"Brad/abc_corp";Department="Sales Admin";"Ryan/abc_corp";Department="Network Systems";"Ryan/abc_corp";Department="Admin";"Ben/abc_corp";Department="Special/Account Project";"Tom/abc_corp";"");

    LVL 46

    Expert Comment

    by:Sjef Bosman
    Add a field that will contain the effective adminperson. If not filled in, the computed one should be used. You could even copy the computed one to the effective one when saving the document.
    LVL 19

    Expert Comment

    Sjef is right
    LVL 46

    Accepted Solution

    Kopibean, just a suggestion: don't put names in the design, but use some document(s) where you can store who's responsible for what department. Then, use a view and a @DbLookup to get the resp. admin.

    Author Comment


    how do I create this field to contain the effective person if not filled in, then the computed field will be used?

    In my send button, formula is
    @MailSend(adminperson ;"":"";"";"Travel Request";"";"Travel Request has been posted. ----->";[IncludeDoclink]);

    @Prompt([Ok];"Message Sent";"Your Reservation Request has been sent to Admin Dept.")
    LVL 46

    Expert Comment

    by:Sjef Bosman
    I suppose you have a button that will take care of all? The idea is to always fill in the effective adminperson, or to have a third field (computed, hidden) that contains the adminperson to be used. I agree, yet another field, but it usually weighs up to a lot of formula coding all over the place.

    Add a formula like
         @If(EffAdminPerson=""; @SetField("EffAdminPerson"; AdminPerson); "");
         FIELD EffAdminPerson=@If(EffAdminPerson=""; AdminPerson); EffAdminPerson);

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
    This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
    This video discusses moving either the default database or any database to a new volume.
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

    779 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

    12 Experts available now in Live!

    Get 1:1 Help Now