Unlike an SQL statement, you can not update an LDAP attribute with another LDAP attribute. You will need to take a multi-step approach.
1. Run a CFLDAP query to get all "distinguishedName" (DN) and "mail" values for all objects you wish to change. This DN will give you the "primary key" of the object as well as its primary email address from which you will extract the mailNickname. 2. Loop over the previous CFLDAP query and perform, for each record, an individual CFLDAP MODIFY action to set the mailNickname to the first part of the email addres. (Use listFirst(query.mail, "@") to get the user name of the address.) In other words, you can't update multiple records while setting individual values for each one. When performing an LDAP update, you must specify the distinguishedName, therefore, you are targetting a *single* LDAP object only. M!ke -----Original Message----- From: Ian Vaughan [mailto:[EMAIL PROTECTED] Sent: Thursday, March 23, 2006 9:00 AM To: CF-Talk Subject: RE: CFLDAP Question ? Hi Mike But how would I extract the following i.vaughan >From the value in the SMTP setting of [EMAIL PROTECTED] Then would you use a query similar to this ? If so how would you loop it so it updates everyone's alias in the OU ? <cfldap action="modify" modifyType="replace" attributes="mailNickname=#????SMTP????# dn="#session.fixeddn#" server="server" port="389" username="username" password="password"> -----Original Message----- From: Dawson, Michael [mailto:[EMAIL PROTECTED] Sent: 23 March 2006 14:16 To: CF-Talk Subject: RE: CFLDAP Question ? It should be possible. The attribute is "mailNickname". M!ke ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:236044 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54