Solved

How to display just last name?

Posted on 2013-01-28
4
370 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

Industry Leaders: 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

Suggested Solutions

  In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…
Lack of Storage capacity is a common problem that exists in every field of life. Here we are taking the case of Lotus Notes Emails, as we all know that we are totally depend on e-communication i.e. Emails. This article is fully dedicated to resolvin…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.
Suggested Courses

738 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