Solved

How to display just last name?

Posted on 2013-01-28
4
369 Views
Last Modified: 2013-12-18
Experts,

I need to display just the last name of an author...how?  Would likely be the first name before the / in the Company Name:

John Smith/Marketing/Company
0
Comment
Question by:AliciaVee
[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 Comments
 
LVL 38

Expert Comment

by:Rich Rumble
ID: 38829686
If you have the Surname/Lastname filled in for your users details then you can query it in a variety of ways. It seems like you want to do it for Lotus Notes? Your Subject and Question are a bit light on details.
The "SN" field of AD is the typical place to find a lastname.

dsquery * dc=some,dc=company,dc=com -filter "(sAMAccountName=user_x)" -attr sn

In windows, if you have dsquery installed/enabled, you would query against some.company.com for user_x and his/her "SN" attribute. Lotus seems to be very similar using Ldap queries, I found this
ldapsearch -h ldap.acme.com "objectClass=*" mail cn sn givenname
http://publib.boulder.ibm.com/infocenter/domhelp/v8r0/index.jsp?topic=%2Fcom.ibm.help.domino.admin.doc%2FDOC%2FH_EXAMPLES_EXPORTING_THE_CONTENTS_OF_AN_LDAP_DIRECTORY_2804_STEPS.html
I hope that helps you.
-rich
0
 
LVL 13

Expert Comment

by:CRAK
ID: 38830693
If your addressbook is filled out properly and you already have an abbreviated or canonical name, you may want to look into (formula) @NameLookup, (Lotusscript) notesDirectory.LookupNames or (java) lookupNames.
Designer help will provide you with the required parameters.
0
 
LVL 4

Accepted Solution

by:
QuinF earned 500 total points
ID: 38830865
Server := "yourservername/yourdomain";
Database := "yourcompanyaddressbook.nsf";
@DbLookup("":"NoCache"; Server : Database ; "($Users)"; @username ; "LastName")

This formula uses the ($Users) view in the company address book.  It takes the user's username and retrieves the Last Name field.  

Hope this helps,
Quin
0
 

Author Closing Comment

by:AliciaVee
ID: 38832244
Thanks!  This worked great!!
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

749 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