How to get common name from @Username

I had created a field on x-page, on compute value I need common name of user.On using formula as @UserName(), it returns canonical name of user, and on using @Name([CN];@username), it returns error.

I had used “Global objects” as Library and Javascript as language.

plzz suggest me how to get common name of user here.

Regards

Rinkal

Subject: Keywords as String

All keywords for @Formulas in XPages need to be strings. If you turn on the default error page it should tell you it’s expecting a string. You need @Name(“[CN]”,@Username).

Subject: Common name

The field is on Custom Control which is then kept on an x-page.@Name(“[CN]”;@username()) is not working, it shows following error:

HHTP Web Server:Command not handled exception

Plzz let me know how to turn on the default error page ?

Rinkal

Subject: Re: common name

If you go to the application properties in Domino Designer, on the XPages tab you can turn on the default error page.Bear in mind it’s @Formulas in javascript, so commas instead of semi-colons, and javascript is case sensitive. So it needs to be @Name(“[CN]”,@UserName)

Subject: Common User Name

Thanks a lot.