Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Lotus Notes / Domino Designer - Hiding Subforms

Posted on 2009-04-02
10
Medium Priority
?
868 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 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

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…
Article by: Rob
Notes 8.5 Archiving Steps and Tips This article covers setting up a Notes archive, and helps understand some of the menu choices making setting up and maintaining a Notes archive file easier.
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

636 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