Announcement

Collapse
No announcement yet.

Active directory fields

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Active directory fields

    What are the characters or combination of characters, which prevent a field from being retrieved from Active Directory?

    Examples of street address field:
    9 Rostom Street 2nd Floor, Suite 9 Garden City - Cannot be retrieved

    100 Fifth Avenue Suite 800 New York - can be retrieved

    359 Blackwell St. Suite 200 - cannot be retrieved

    I tried to remove the period and/or comma, but I still cannot retrieve the field. If I replace it by a litteral same as Active Directory field, it works. Those are strange observations. I would appreciate if someone would have a clue to resolve this issue

  • #2
    Re: Active directory fields

    How and what are you using, to retrieve the values? where you export to?
    And, what do you mean with "If I replace it by a litteral same as Active Directory field"?

    /Rems

    This posting is provided "AS IS" with no warranties, and confers no rights.

    __________________

    ** Remember to give credit where credit's due **
    and leave Reputation Points for meaningful posts

    Comment


    • #3
      Re: Active directory fields

      I am retrieving different fields including streetaddress, which is the one giving me problems from Active Directory using LDAP and putting those fields into a form.

      On the form there is a button to open a popup window to select an employee, which triggers code to retrieve his info from Active Directory and display it automatically on the form.

      With certain addresses I mentioned in my post the popup window closes without putting any value on the form, but for all other addresses, it works.

      I tried to remove the period and the comma from the query querying the Active Directory, but it still does not work, only when I replace the value in the variable by the litteral street address that it works.

      Here is some code. The query loop you see is the extraction from Active Directory
      Code:
      <cfoutputquery="getActiveDirectoryEmployee">
      <!---<cfset cleanStreetAddress = replace(getActiveDirectoryEmployee.streetaddress,"Suite ","","All")>--->
      <!---<cfset cleanStreetAddress = TRIM(getActiveDirectoryEmployee.streetaddress)>--->
      <!---<cfset cleanStreetAddress = TRIM(replace(getActiveDirectoryEmployee.streetaddress,".","\.","All"))>--->
      <!---<cfset cleanStreetAddress = '359 Blackwell St. Suite 200'>--->
      <cfset cleanStreetAddress = getActiveDirectoryEmployee.streetaddress>
      <cfdumpvar="#cleanStreetAddress#"><br>
      <!---<cfdump var="#streetaddress#"><br>--->
      <!---<cfdump var="#getActiveDirectoryEmployee.streetaddress#"><br>--->
      <!---<cfif ListContains(streetaddress, '359 Blackwell St. Suite 200')>--->
      <!---<cfif cleanStreetAddress contains '359 Blackwell St. Suite 200'>--->
      <cfifFindNoCase('359 Blackwell St.', streetaddress) GT 0>
      <cfset cleanStreetAddress = '359 Blackwell St. Suite 200'>
      <cfdumpvar="Here"><br>
      <cfdumpvar="#cleanStreetAddress#"><br>
      </cfif>
      <!---<cfset cleanStreetAddress = #streetaddress#>--->
      <!---<cfabort>--->
       
      
      '#sn#','#givenName#','#cleanTitle#','#strEmail#','#employeeID#','#supervisor#','#department#','#cleanStreetAddress#','#l#','#st#','#postalcode#','#c#'
      <ahref="" onClick="selectActiveDirectoryEmployee('#sn#','#givenName#','#cleanTitle#','#strEmail#','#employeeID#','#supervisor#','#department#','#cleanStreetAddress#','#l#','#st#','#postalcode#','#c#');returnfalse;">#sn#, #givenName#</a>
      <!---<a href="" onClick="selectActiveDirectoryEmployee('#cn#','#sn#','#givenName#','#title#','#strUserName#','#strEmail#','#employeeID#','#supervisor#','#department#','#streetaddress#','#l#','#st#','#postalcode#','#c#','#co#');return false;">#sn#, #givenName#</a>--->
      </td>
      </tr>
      </cfoutput>
      Thanks for responding
      Last edited by Rems; 26th June 2014, 16:18.

      Comment


      • #4
        Re: Active directory fields

        I query the Active Directory with LDAP in coldFusion and I get all the fields I need, but I get the problem described below when I pass them into the javascript function called "selectActiveDirectoryEmployee", which fill up the form with employee info. It even does not get into the function for certain records, because of the streetaddress field. The whole record cannot be displayed on the form, because of what is in that field.
        For the examples below, if they don't display with the variable from Active Directory, they will display if I replace the variable by a literal string being exacly the same as what it is in the variable. This is very strange and I don't know what to do at this point.

        Examples of street address field:
        9 Rostom Street 2nd Floor, Suite 9 Garden City - cannot be displayed on form

        100 Fifth Avenue Suite 800 New York - can be displayed


        359 Blackwell St. Suite 200 - cannot be displayed
        Code:
        <cfoutputquery="getActiveDirectoryEmployee">
            <cfset cleanStreetAddress = #streetaddress#>
        
        <cfif FindNoCase('359 Blackwell St.', streetaddress) GT 0> <cfset cleanStreetAddress = '359 Blackwell St. Suite 200'> <cfdump var="#cleanStreetAddress#"><br>
        </cfif> <ahref="" onClick="selectActiveDirectoryEmployee('#sn#','#givenName#','#title#','#mail#','#employeeID#','#manager#','#department#','#cleanStreetAddress#','#l#','#st#','#postalcode#','#c#');returnfalse;">#sn#, #givenName#</a>
        </cfoutput>
        Last edited by Rems; 27th June 2014, 09:06. Reason: added [CODE] tags

        Comment

        Working...
        X