Quantcast
Channel: Adobe Community: Message List - ColdFusion
Viewing all articles
Browse latest Browse all 21760

Re: LDAP output issue

$
0
0

You have a query with 5 rows in it.  It has two columns, called respectively 'Name' and 'Value'.  So when you try to access #givenName# it fails because it doesn't know what you're on about.

 

Instead you'd have to refer to #userSearch.Name# (notice I've query-scoped the column, always a good idea). 

 

If you're specifically wanting to get just the value of the givenName, you could refer to it like this (if you know that it will always be the third column):

 

<cfoutput>#userSearch.Name[3]#</cfoutput>

 

NB: this will just output 'givenName'.  So you'd maybe rather use #userSearch.Value[3]#

 

But it would be better to turn your query into a struct.  Alternatively, loop over the query.  Check the Name column on each iteration of the loop.  If Name = 'givenName', output the Value column.


Viewing all articles
Browse latest Browse all 21760

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>