Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Getting Short Name from NAB for a member of a group

Posted on 2004-10-11
2
Medium Priority
?
365 Views
Last Modified: 2013-12-18
I'm trying to get the short name field out of the nab for individual members of a group in the nab.

My attempts so far are below with the problem (at least the first one) is that the evaluate statement for
searchname is evaluating to a blank.  The first part works (it brings back the group members names in the following format CN = John Smith/OU=xyz/O=abc).  So i basically want to convert that to John Smith, go to the $VIMPeople View of the NAB and extract the shortname from the document.

Any ideas would be appreciated.

Thanks

smeyer4314

      Dim nabdb As notesdatabase
      Dim nabdoc As notesdocument
      Dim nabdoc2 As notesdocument      
      Dim nabview As notesview
      Dim nabview2 As notesview
      Dim nabsession As New notessession
      
      filenum = Freefile()
      Open "c:\my documents\group_list.txt" For Output As #Freefile
      
      srv = "myserver"
      dbn = "names.nsf"
      
      Set nabdb = New notesdatabase(srv,dbn)
      Set nabview = nabdb.getview("Groups")
      
      Set nabview2 = nabdb.getview("$VIMPeople")
      
      docname = "MyLookupGroup"
      Set nabdoc = nabview.getdocumentbykey(docname,True)
      
      If nabdoc Is Nothing Then
            Msgbox("no document")
      Else
            Forall member In nabdoc.members
                  Print #filenum, member
                  Msgbox(member)
' ok to here
'                  searchname = Evaluate(|@name([Abbreviate];member)|)
                            tname = searchname(0)
                  Msgbox (tname)      
' returns a blank tname
'            
                  Set nabdoc2 = nabview2.getdocumentbykey(tname,True)
                  If nabdoc2 Is Nothing Then
                        Msgbox("no document on internet name lookup")
                  Else
                        short_name = nabdoc2.shortname(0)
                        Print #filenum, short_name
                        
                  End If
            End Forall
      End If
      
      Close #fileNum
      
      
      
End Sub
0
Comment
Question by:smeyer4314
[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
2 Comments
 
LVL 31

Accepted Solution

by:
qwaletee earned 500 total points
ID: 12280635
Instead of $VIMPeople, use .getView("($Users)")

You can drop the whole Evaluate.  Just use nabView2.getDocumentByKey(member,true) -- because that view includes all users sorted by canonical name (CN=...)
0
 

Author Comment

by:smeyer4314
ID: 12280978
Qwaltee;

Thanks, that worked.

Steve m
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
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…

730 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