home
design & development
Lotus application development
print design
web site development
request a design quote
solutions & consulting
Notes and Domino application development
Lotus Domino administration
Securence Mail Filtering
UNITRENDS backup and recovery
Lotus Notes / Domino Apps
free Lotus Notes apps
hosting
web site hosting
Lotus application hosting
check your mail
request a hosting quote
publishing
media and publishing
sound
client services
help & support
Make Payment
Client Access - Workboard
billing & payment policies
copyright & liability policies
pricing & turnaround policies
privacy statement
contact
e-mail MW
get files
send files
@UserName for Hide/When in an Xpage
Mindwatering Incorporated
Author: Tripp W Black
Created: 12/09/2011 at 10:47 PM
Category:
Notes Developer Tips
XPages
Issue:
Need XPage equivalent for @Formula:
@LowerCase(@UserName)="Anonymous"
Solution:
if
(@LowerCase(@UserName(0)) ==
'anonymous'
) {
"false"
;
}
else
{
"true"
;
}
Solution 2:
Use the new JavaScript application/session objects:
var curuser = session.getEffectiveUserName();
if (curuser.toLowercase == 'anonymous') {
false;
} else {
true;
}
or
curuser.toLowercase == 'anonymous';
Note:
Frustrated your "visible". Although it says "true" in the source you want true the booleon as the returned value.
Also, notice that @UserName(0) is an array which you want the first value.
previous page
×