Returning Multiple Value Attributes

--LTeJQqWS0MN7I/qa
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi List, I am using Net::LDAP and i am trying to return an attribute in a d=
n that has multiple values. When I do the search and use $entry->get_value(=
 $attr ) it only returns the one value. Is there a way returning multiple a=
ttribute values?

Many thanks
--=20
slr,

ISP Systems Specialist
Telkom Internet
#qmail-ldap @ irc.freenode.net

This message has been made from 100% recycled bits.

----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GIT/MU/E d? s+:+ a- C++++>+++++ USL++++$ P++++ !E(---)W+@ !N
o?(--) K? !w(---) O- M+ V PS+@ PE Y-- PGP++>+++ !t(---) !5 !X
R-- !tv b(++) DI++ !D(----) G+++>++++ e++>* h----(*) r+++ y++++
-----END GEEK CODE BLOCK------

--LTeJQqWS0MN7I/qa
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFC3nNYAFsW6Atlq9wRAgTvAKCPRyJkSwvc7EDrDvmYsUUQJ5/X5gCfa7J8
bZMWiPz36q3HOc3aj15ZUtM=
=uYmj
-----END PGP SIGNATURE-----

--LTeJQqWS0MN7I/qa--
0
scott
7/20/2005 3:52:56 PM
perl.ldap 1268 articles. 0 followers. Follow

2 Replies
991 Views

Similar Articles

[PageSpeed] 18

On 20/7/05 4:52, Scott Ryan <scott@staff.telkomsa.net> wrote:

> Hi List, I am using Net::LDAP and i am trying to return an attribute in a dn
> that has multiple values. When I do the search and use $entry->get_value(
> $attr ) it only returns the one value. Is there a way returning multiple
> attribute values?

If you call it in an array context, it'll return an array of values.

    my (@v) = $entry->get_value("objectClass");

Cheers,

Chris


0
chrisridd
7/20/2005 6:43:19 PM

--On Wednesday, July 20, 2005 5:52 PM +0200 Scott Ryan 
<scott@staff.telkomsa.net> wrote:

> Hi List, I am using Net::LDAP and i am trying to return an attribute in a
> dn that has multiple values. When I do the search and use
> $entry->get_value( $attr ) it only returns the one value. Is there a way
> returning multiple attribute values?

Of course. :)

get_value ( ATTR, OPTIONS )
    Get the values for the attribute ATTR. In a list context returns all 
values for the given attribute, or the empty list if the attribute does not 
exist. In a scalar context returns the first value for the attribute or 
undef if the attribute does not exist.

So you simply need to use it in a list context.

See:

<http://perl.enstimac.fr/perl5.8.5//site_perl/5.8.5/Net/LDAP/Entry.html>

for more on this.

--Quanah

--
Quanah Gibson-Mount
Principal Software Developer
ITSS/Shared Services
Stanford University
GnuPG Public Key: http://www.stanford.edu/~quanah/pgp.html
0
quanah
7/20/2005 6:48:30 PM
Reply:

Similar Artilces:

add values to multiple-valued attribute error
try add multiple values to a mulitple-valued attribute (that can be done with a GUI / LDIF).However, use following code, I get error when insert multiple values for Properties("mgrpRFC822MailMember") (but it works with only one entry)Any help is very welcome.Thx Dim de1 = New DirectoryEntry("LDAP://" & ldapServerName & _            "/ou=MailGroup,dc=pcihl,dc=com", "cn=Manager,dc=pcihl,dc=com", "secret", AuthenticationTypes.ServerBind)            Dim newLstEntry As Direct...

Using specific values from multi-valued attributes via LDAP?
I understand how to inject LDAP attribute data in to the authentication process via the form fill, but is there a way to select a specific value from a multivalued attribute? Say for example that I have an attribute called "myPasswords" that has multiple string values specifying a URL and a stored password. I'd need to be able to search for the value needed for the URL I'm authenticating to, then parse out the password section of that string and inject it in to the "password" box in the form. Possible? Not possible? ---------------------------------...

Multi-valued attribute to single attribute conversion
Afternoon Everyone! I have been trying to use the default rule in the AD driver to strip multi-valued attributes but for a modify operation but without any luck. I made a copy and put it in the Command Transformation. Would someone please give me asome pinters. I keep getting LDap Error 21, Invalid syntax. Error in attribute conversion operation. Here is the rule I am attempting using: <rule> <description>Convert multi-valued Telephone to single value</description> <conditions> <and> <if-operation op="equal">modify<...

LDAP Attribute Values
Hi everyone,Is it possible to have dynamic/virtual attribute values for the LDAP owner attribute.  For example, if I have an owner attribute value set for an OU (organizational unit), can all users in that OU have that same owner attribute value dynamically assigned to them?Thanks. I am not sure what you mean.  Are you asking is there an AD supported way to infer that objects in an OU belong to the same owner of the OU?  Not really is the answer.  There are things like security ownership and things like 'managedBy' attribute that can show the 'owner' of an...

Mutli-valued attribute to multi-valued attribute
We want to synchronize a multi-valued attribute (created by our own) to a multi-valued attribute in the other edirectory store. But when we are adding attributes we only have the changed values. The previous one is lost. When deleting one value in the Identity Vault then it removes the attribute from the object. Any ideas ? > We want to synchronize a multi-valued attribute (created by our own) to a > multi-valued attribute in the other edirectory store. But when we are > adding attributes we only have the changed values. The previous one is > lost. When deleting ...

returning multiple values
Thanks for all your help earlier. I am doing much better now. 1/3 of my script actually passes the tests now! But I seem to be stuck again. This sub is supposed to take a string and parse it into another string and 2 integers. I get the new string back but not the integers, any ideas? It passes the first test: print "not " unless defined &parse_range; print "ok 2\n"; On the second test for this sub I get: Failed 1/1 test scripts, 0.00% okay. 1/5 subtests failed, 80.00% okay. *** Error code 29 Belinda <snip excess code> void parse_range (...

Multiple attribute value
C#, web form, VS 2005.  Thank you in advance for reading/helping.Working with XML returned from a web service,  have some nodes that have the same name but different attribute values. Ex.<ReceivedRecords pk=""/><ReceivedRecords pk="1234.56"/><ReceivedRecords pk="789.00"/>I'm setting the value of the XML to a text box using xPath...here is the code://Grab value of returned XML at this location.XmlNodeList xmn30 = mydoc.SelectNodes("/Envelope/Body/Response/Contract/ReceivedRecords/@pk");//Output the results to a text boxtxtReceivedRecords.Text = (xmn30[0].InnerText)...

Multiple Return Values
I have a situation where I need two values (both are integers) returned from a stored procedure. (SQL 2000) Right now, I use the statement "return @@Identity" for a single value, but there is another variable assigned in the procedure, @NewCounselingRecordID that I need to pass back to the calling class method. I was thinking of concatenating the two values as a string and parsing them out after they are passed back to the calling method. It would look something like "21:17", with the colon character acting as a delimiter. However, I feel this solution is kludg...

Returning multiple values
Hi! I use "Return var" to return a single value from my web service. So I need to know how to return multiple values instead of a single one. Can you help me? Thanks a lot. Please see below example, it could lead to solve your problem! http://www.w3coder.com/contest/examples/WSObjMultiArr.asmx source code at http://www.w3coder.com/contest/examples/WSObjMultiArr.asmx.txt Sreedharhttp://www.w3coder.orgweblog http://weblogs.asp.net/skoganti...

What is the best way to make a subroutine visible to multiple .aspx documents and return multiple values
I have a complex subroutine that has 10 input values and needs to return 10 result values.  What is the best way to make this visible to multiple .aspx documents? Thanks,David  you can try with custom entity objects as return type. Entity class has a property of all results.    This depends on your architecture.  If this is just a common subroutine that is not related to a class, you could just create a class of utility methods.  (I still say class because I'm anti-module in VB).  If you declare the subroutine as public/friend with a static ...

LDAP attribute Map / LIst / extend the LDAP attributes
we are use ladp on netware 65, is there a list of the LDAP attributes avaliable that are used for eDirectory 8.7? is it possible to create a ldap attribute that contains more that one edirectory attribute content and extend it with a static variable? any ideas HELGE -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Most eDirectory attributes are available natively by their name (minus spaces and special characters). For example fullname works to retrieve the 'Full Name' and givenname works for 'Given Name' and sasloginconfiguration works for 'SAS:...

One attribute value to two attributes/ values in eDir
Collective, I have a very interesting issue. I have the need to break one attribute that is in AD (ADval1) to two attributes in eDir (attrval1 and attrval2) . Basically what I want to do is take ADval1 and break that data into the two other attributes, attrval1 and attrval2. The attribute in AD looks like this: AD attribute value data 1 | value data 2 In eDir it looks like this: eDir attribute 1 vlaue data 1 eDir attribute 2 value data 2 I don't know if that's clear, when it was explained to me it was a white board. Has anyone tried this or have any id...

how to return return value?
imagine there was an sp beyond your control (i.e. you cannot use output parameters to obtain the value) but you had to catch the return value submitted by "return <value>" how would you do that? execute returns boolean executeUpdate returns int, but obviously not the return value but rows affected or so what the..? -- pat Hello Pat, For the return value you wills till need to register it as an output parameter, no matter how you execute the sproc. You would need to send the SQL as something like: {? = call sprocName(?, ?, ....)} The for the retu...

Multiple return values in SpiderMonkey
How can we create a multiple return value in SpiderMonkey? See http://developer.mozilla.org/en/docs/New_in_JavaScript_1.7#Multiple-value_returns Franky. On Dec 24, 2007 11:00 AM, Franky Braem <f.braem@skynet.be> wrote: > How can we create a multiple return value in SpiderMonkey? See > http://developer.mozilla.org/en/docs/New_in_JavaScript_1.7#Multiple-value_returns Just create an array and return it. Mike ...

Web resources about - Returning Multiple Value Attributes - perl.ldap

Attribute - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

Template:Attributes of God - Wikipedia, the free encyclopedia
Language: English Română Home Random Template:Attributes of God Part of a series on the Attributes of God Aseity Eternity Graciousness Holiness ...

Six Attributes Of The Perfect Facebook Page Administrator
So, here’s the thing: In many ways, hiring a Facebook page administrator is akin to hiring a poster child for your brand. This trusted manager ...

PANDA: Pose Aligned Networks for Deep Attribute Modeling - Facebook
We propose a method for inferring human attributes (such as gender, hair style, clothes style, expression, action) from images of people under ...

Facebook announces data partnerships to help advertisers target users by offline purchases and attributes ...
... will anonymously match data from consumer loyalty programs with user profiles in order to target ads by offline purchase habits and other attributes. ...

New Study Attributes Rapid Ageing Mainly To Environment Factors
New study explains why some people age faster than others.

Should I use the nofollow attribute on internal links? - YouTube
Regarding "nofollow" on internal links: Does it hurt? Does it help? I read different comments from Matt on this matter over time. What's the ...

Justin Trudeau attributes abortion stance to father's example
Liberal Leader Justin Trudeau says he is following an example set by his famous father when it comes to his position on election candidates and ...

Obama attributes western U.S. wildfires to climate change
... that has burned nearly 400 square miles in the north-central part of Washington state, along with blazes in other Western areas, can be attributed ...

Fifty Shades Of Grey Baby Births: Windsor Hospital Sees Spike In Births, Attribute Book
A significant spike in baby births at a hospital in Windsor, Ontario, has been attributed to the book Fifty Shades of Grey, which has become ...

Resources last updated: 12/4/2015 1:29:46 PM