Link to home
Create AccountLog in
Avatar of kali958
kali958Flag for United States of America

asked on

Hide When for edit on a document

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
ASKER CERTIFIED SOLUTION
Avatar of CRAK
CRAK
Flag of Netherlands image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
SOLUTION
Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
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).
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 !
Also, you should consider using an "Authors" field for "True" security.
Avatar of kali958

ASKER

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