?
Solved

Lotus Notes / Domino Designer - Hiding Subforms

Posted on 2009-04-02
10
Medium Priority
?
872 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 2000 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
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.

 
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

This is an old article, please see an updated version of this article, located here: http://www.experts-exchange.com/articles/23619/Notes-8-5x-Windows-7-Notes-info-and-tips.html
This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…

864 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