Solved

Hide when Formula required for a button in Lotus notes

Posted on 2010-09-12
6
1,050 Views
Last Modified: 2013-12-18
Hello,

Hoping for some help with a hide when formula below which sits behind a "Approve" button within a workflow document.
-------
Current Hide when
Assign = ""|
@LowerCase(Assign) !=@LowerCase((@Name([CN];@UserName))) |
Status_K!=NULL

-----

This formula works OK for a single user in the "Assign" field which is on the form however when there are multiple entries seperated by a semi colon  i.e one of five people can approve the button remains hidden.

Not quite sure on how to do this in a formula argument . In english it would be something like :

if a your name is one of many listed in the assign field  seperated by a semi colon then unhide the button.

The answer can not be use a role as the assign field is dynamic i.e depending on who you are you will have different approvers.


Hoping you can help.

Thanks
0
Comment
Question by:ianmcalder
6 Comments
 
LVL 5

Accepted Solution

by:
iPinky earned 250 total points
ID: 33659684
try to exchange the part @LowerCase(Assign) !=@LowerCase((@Name([CN];@UserName)))

with !@ismember( @LowerCase((@Name([CN];@UserName))); @LowerCase(Assign) )
0
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 33660026
My guess... There is often a LOT of confusion about the formula to use as hide-when. I assume it's like that in this case. But actually, it is simple mathematical logic that you have to apply. I'll chop it up in digestible parts for you.

ismember:= @LowerCase(@Name([CN];@UserName))=@LowerCase(Assign);
isstatusok:= Status_K!=NULL;
showwhen:= ismember & isstatusok;
hidewhen:= !showwhen;

By the way, what is NULL? In formula language it doesn't exist, so it's assumed to be a variable without a value, probably with an empty string value. Hence it works. But someone evil could assign a value to NULL, e.g. NULL:= "0" and your formula will stop to work. Theoretically speaking of course...
0
 
LVL 22

Expert Comment

by:mbonaci
ID: 33660175
One small suggestion, instead of
    !@IsMember

use
    @IsNotMember

It sounds better:
    "Hide when current user is not member of the field Assign"

@IsNotMember( @LowerCase( @Name( [CN]; @UserName ) ); @LowerCase( @Name( [CN]; Assign ) ) )
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 5

Expert Comment

by:iPinky
ID: 33660655
mbonaci: well.. if we go with tips: my all time best tip is to form the formula to "Show when" and put !( ) around it...

cause with this technique it's much easier (usually) to get the right formula, basically sjef_bosmans approach, which also lacks the last line: which would be "hidewhen"; (cause, obviously the last line is simply an assignment from showwhen to hidewhen, but the formula wouldn't know what to do with it and would basically always result return a "No main or selection expression in formula"
0
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 33661291
I merely explained mathematical logic, and I made all the intermediate steps... Of course it can all be written as one statement, as you suggested, using parentheses and without the 'variables', but that was beside my point.
0
 

Author Closing Comment

by:ianmcalder
ID: 33668891
Thanks for your efforts !!!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Validating Email Address 13 284
Text over two lines in VBA for email 26 159
lotus notes, exchange 7 108
Lotus Notes – Domino Document Manager 4 105
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…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

895 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

14 Experts available now in Live!

Get 1:1 Help Now