Solved

Lotus Notes / Domino Designer - Hiding Subforms

Posted on 2009-04-02
10
851 Views
Last Modified: 2013-12-18
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

0
Comment
Question by:fselliott
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
  • 2
10 Comments
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 24054879
The best way to hide a subform is to make it a computed one.
0
 
LVL 4

Accepted Solution

by:
chuckalicious earned 500 total points
ID: 24058297
As sjef said, you should use a computed subform. In the formula, you could use the formula included.

I use it all the time and it works a treat.
@if(@Contain(originator; @Name([CN]; @UserName)) |  @Contain(approver; @Name([CN]; @UserName));"MySubformName";"")

Open in new window

0
 

Author Closing Comment

by:fselliott
ID: 31565952
Thank you for including the code!
0
Industry Leaders: 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!

 
LVL 4

Expert Comment

by:chuckalicious
ID: 24059892
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.
0
 

Author Comment

by:fselliott
ID: 24059975
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!
0
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 24060027
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
0
 

Author Comment

by:fselliott
ID: 24060088
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?
0
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 24060133
Heh, that was quick! :-)

You shouldn't use @Contains, but @IsMember
0
 

Author Comment

by:fselliott
ID: 24060151
Thank you!
0
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 24060282
And don't forget to swap the parameters in those functions! See the Help database...
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
IBM Notes offer Encryption feature using which the user can secure its NSF emails or entire database easily. In this section we will discuss about the process to Encrypt Incoming and Outgoing Mails in depth.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

732 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