|
|||||
|
||||||
Other Library Functions |
function |
ldap.retrieve-values |
Library: LDAP support (OMLDAP)
Import: omldap.xmd |
define external function ldap.retrieve-values of value ldap.attribute entry into modifiable stream values using value integer datatype optional
Argument definitions
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 |
Copyright © Stilo International plc, 1988-2008.