Link to home
Start Free TrialLog in
Avatar of fselliott
fselliottFlag for United States of America

asked on

Lotus Notes / Domino Designer - Hiding Subforms

How do I hide a subform from view of anyone that is not an originator or approver of the form? (Originator and approver are fields on the form - not roles.) I have tried coding the Section "Hide paragraph if formula is true" with the code below, but that is not working.
@If(!@IsNewDoc | @IsNewDoc & !@Contain(originator; !@Name([CN]; @UserName)) |  !@Contain(approver; !@Name([CN]; @UserName)))

Open in new window

Avatar of Sjef Bosman
Sjef Bosman
Flag of France image

The best way to hide a subform is to make it a computed one.
ASKER CERTIFIED SOLUTION
Avatar of chuckalicious
chuckalicious
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of fselliott

ASKER

Thank you for including the code!
Note that the code should be "@containS" ie contains plural, not "@contain". I simply copied that bit from your original post, but you get the idea.
Yes, thank you. I added to the code to allow for the role of Admin to be able to view no matter, and also if it was a new doc. The code now reads as:  

@If(@IsNewDoc | @Contains(Originator; @Name([CN];@UserName)) | @Contains(ApproverName1; @Name([CN]; @UserName)) | (@IsMember("[Admin]";@UserRoles)); "Header"; "")

Thanks again!
I should have spilled more beans the first time...

Then you'll have to do with just another hint.

I hope you don't have these two people working for you: Jim Watt and Jim Watts
Good point, but I'm really flying by the seat of my pants in learning the code. I just keep pulling resources together to accomplish the goal. If I understand your comment correctly as the permissions are still not as secure as they could be, how would I then avoid having Jim Watt view a subform that was created originally by Jim Watts?
Heh, that was quick! :-)

You shouldn't use @Contains, but @IsMember
Thank you!
And don't forget to swap the parameters in those functions! See the Help database...