Solved

How to display just last name?

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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

  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…
Article by: Rob
Notes 8.5 Archiving Steps and Tips This article covers setting up a Notes archive, and helps understand some of the menu choices making setting up and maintaining a Notes archive file easier.
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

705 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

19 Experts available now in Live!

Get 1:1 Help Now