• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 215
  • Last Modified:

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
0
kali958
Asked:
kali958
2 Solutions
 
CRAKCommented:
The editable field:
!(@IsNewDoc | pMember=@Name([CN];@UserName))

i.e.:
hide when not (a new doc or the names match)
= show when (new or match)

The display field should be opposite.... remove the "!"
0
 
Bill-HansonCommented:
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))
0
 
Bill-HansonCommented:
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).
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
SysExpertCommented:
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 !
0
 
Bill-HansonCommented:
Also, you should consider using an "Authors" field for "True" security.
0
 
kali958Author Commented:
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
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now