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

ldap.retrieve-values

 
 

Library: 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
 
 

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

OmniMark 9.1.0 Documentation Generated: September 2, 2010 at 1:38:10 pm
If you have any comments about this section of the documentation, please use this form.

Copyright © Stilo International plc, 1988-2010.