swirl
Guide to OmniMark 7   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesLegacy LibrariesErrors
 
      Other Library Functions  
function  

ldap.retrieve-values

 
 

Library: Interfaces, LDAP support (OMLDAP)
Import: omldap.xmd

Declaration

  define external function ldap.retrieve-values
      of       value      ldap.attribute entry
      into     modifiable stream         values
      using    value      integer        datatype optional

Argument definitions

entry
An ldap.attribute containing the current entry.
values
A shelf of values returned for the requested attribute.
using
The type of the requested attribute values. The default is ldap.text-type; the other option is ldap.binary-type.


Purpose

This function retrieves the values of the specified attribute of the current entry.

This function is very useful when an attribute may have more than one value.

The following example outputs all of the telephone numbers for each entry satisfying the search. Some entries may have more than one telephone number.

  import "omldap.xmd" prefixed by ldap.

  process
     local ldap.connection my-ldap
     local ldap.attribute  my-entry variable
     local stream          phone    variable

     set my-ldap to ldap.open 'www.stilo.com'
     ldap.search my-ldap
        base  "o=stilo.com"
        where  "(Department=rd)"
        into   my-entry
        select "phonenumber"

     repeat
        exit unless ldap.entry-exists my-entry
        output ldap.entry-name of my-entry || ": "

        ldap.retrieve-values of my-entry{"phonenumber"} into phone
        repeat over phone
           output ", " unless #first
           output phone
        again
        output "%n"
        ldap.advance-entry my-entry
     again

ldap.reader can be used when there is only one value, or when you know exactly which values you want.

        Other Library Functions
   ldap.add-entry
   ldap.advance-entry
   ldap.attribute
   ldap.close
   ldap.connection
   ldap.create-attribute
   ldap.delete-entry
   ldap.entry-exists
   ldap.entry-name
   ldap.modify-entry
   ldap.name
   ldap.omldap-version
   ldap.open
   ldap.reader
   ldap.rename-entry
   ldap.retrieve-values
   ldap.search
 
 

Top [ INDEX ] [ CONCEPTS ] [ TASKS ] [ SYNTAX ] [ LIBRARIES ] [ LEGACYLIBRARIES ] [ ERRORS ]

OmniMark 7.1.2 Documentation Generated: June 28, 2005 at 5:45:26 pm
If you have any comments about this section of the documentation, send email to [email protected]

Copyright © Stilo Corporation, 1988-2005.