fselliott
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)))
The best way to hide a subform is to make it a computed one.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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.
ASKER
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]";@User Roles)); "Header"; "")
Thanks again!
@If(@IsNewDoc | @Contains(Originator; @Name([CN];@UserName)) | @Contains(ApproverName1; @Name([CN]; @UserName)) | (@IsMember("[Admin]";@User
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
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
ASKER
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
You shouldn't use @Contains, but @IsMember
ASKER
Thank you!
And don't forget to swap the parameters in those functions! See the Help database...