Publdapsearch question

(IS 4.6) In an ldap:search I have set a value of erpid for ldapReturnAttributes. In the pipeline the ldapSearchResults record only
has values $name and $object in it (of course). When I look in the results tab I can see the erpid values captured in ldapSearchResults. My question: I would like to map the erpids to a record so that I can put them in an xml doc. Have mercy on a newbie and explain how I can “get” those erpids from the results tab to a record in the pieline.
Thank you in advance - and I hope I was clear.

I’m a newbie to webMethods 6 also, so…

At the VERY simplest level (one directory entry returned, single-valued attribute), what works for me is to create a document that contains a string variable with the name of the attribute, and then, in the pipeline, just connect the ldapsearchresults output to that document - and webMethods automagically does the mapping.

So, in your case, you would need a document with a string variable named “erpid”. And from there, you can do additional processing

It gets more complicated from there (which is what I’m working with now)

  • multivalued attributes are returned in string lists, not strings
  • multiple directory entries are returned in multiple documents (since ldapSearchResults is a document lists)
  • error handling

Best of luck!

Thank you for your quick and helpful response.

Have you looked at the pub.ldap.lookup service? It requires that you know the dn of the directory entry, but if you do, it returns the data in a nice manner…

Thanks again. My ultimate problem seems to be often discussed in this forum. My filtered ldap:search (I’m looking for the IDs of active customers) returns several thousand results. If I manually add the item erpid to my ldapSearchResults Record in the pipeline I can loop through this Record and capture explicitly the erpid. So far so good. Subsequent to this step I would like to append this erpid value to a Record List using appendToRecordList. The chronic problem created by this method, and to which I am researching solutions, is that each time you append a new erpid (and hardcode an item that indicates this erpid is active) to the Record List every Record in the Record List takes the current item’s erpid value. I am looking through the forums for good solutions and would be happy to hear of any that you or others may have. Thanks again.