Solved

Lotus Notes / Domino Designer - Hiding Subforms

Posted on 2009-04-02
10
832 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
  • 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
 
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
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

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…
Problem "Can you help me recover my changes?  I double-clicked the attachment, made changes, and then hit Save before closing it.  But when I try to re-open it, my changes are missing!"    Solution This solution opens the Outlook Secure Temp Fold…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

758 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now