Hide When for edit on a document

Posted on 2007-10-02
Last Modified: 2013-12-18
I have a project form in a project tracking database.  On the form, I want anyone to be able to create a New Project but I only want the Project Manager to be able to edit the document after it is created.

I have created a display field to show the Team Members the project information. I just can not figure out the Hide When on the Input Fields and the Display fields. So far I have:

On the Project Doc field that the PM can edit, I have this Hide When:

!@IsNewDoc | pMember!=@Name([CN];@UserName)

On the Display Field for the Team Members I have

@IsNewDoc | pMember=@Name([CN];@UserName)

This is just not working for me.  When I open the document to create a new form, I have to put a PM Name in and then all the fields are hidden, so that is not good.

Any help would be great!!! Thanks
Question by:kali958
    LVL 13

    Accepted Solution

    The editable field:
    !(@IsNewDoc | pMember=@Name([CN];@UserName))

    hide when not (a new doc or the names match)
    = show when (new or match)

    The display field should be opposite.... remove the "!"
    LVL 22

    Assisted Solution

    For the editable fields, the hide formula should be...

    !(@IsNewDoc | pMember = @Name([CN];@UserName))

    ... and for the non-editable fields...

    (@IsNewDoc | pMember = @Name([CN];@UserName))
    LVL 22

    Expert Comment

    A tip regarding boolean logic:

    If you need to invert an expression, you need to invert everything including the operators.  Placing the entire expression inside of parenthesis and adding a NOT operator is the easiest way to invert an expression, but you can do it manually.  For example, these two expressions are the same...

    !(@IsNewDoc | pMember = @Name([CN];@UserName))

    ... and ...

    !@IsNewDoc & pMember != @Name([CN];@UserName)

    ... Notice that we inverted each value in the expression as well as the operator (ie: ANDs switch to ORs and vice versa).
    LVL 63

    Expert Comment

    Also, you might consider using sections so that you do not have to change the hide/when on individual fields or paragraphs.

    I hope this helps !
    LVL 22

    Expert Comment

    Also, you should consider using an "Authors" field for "True" security.

    Author Comment

    Thank you so much!!! That is the answer i was looking for.  I wanted to split the points due to you both gave answers I could use

    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!

    This is an old article, please see an updated version of this article, located here:
      In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

    737 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

    22 Experts available now in Live!

    Get 1:1 Help Now