?
Solved

How to display just last name?

Posted on 2013-01-28
4
Medium Priority
?
374 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 2000 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

For beginners of Lotus Notes user this is important to know about the types of files and their location supported by IBM Notes. Mostly users are unaware about how many file types are created and what their usages are. This Article is fully dedicated…
IBM Notes offer Encryption feature using which the user can secure its NSF emails or entire database easily. In this section we will discuss about the process to Encrypt Incoming and Outgoing Mails in depth.
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

762 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