GetEmployeesForManager - InfoPath Dev
in

InfoPath Dev

GetEmployeesForManager

Last post 09-02-2011 03:31 AM by ErnestoM. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 08-31-2011 12:26 PM

    GetEmployeesForManager

    I have successfully utilized the GetEmployeesForManager call and populated a dropDownList with the return set.

    However, it appears that the sAMAccountName|userID, is returned for both the "key" and "value" in each return set.

    Ideally, is there a way to modify the return set to provide the userDisplayName for the "value", so that I can provide a useful display to the users?  or is there another way to accomplish the "key" = userID and "value"= displayName for each returned set?

  • 08-31-2011 03:50 PM In reply to

    Hi Saluki34 and welcome,

    Yes, it's easy to set a field's value and use a filter to specify which key to use. That should be part of the HowTo guide that we provide with the DBXL Web Service. Let me know if you can't find it. But, basically, you just want to create a rule with an action that sets a fields value using the "value" field and then filter where "key" equals text and type in sAMAccountName or whatever.

    Good luck!

    Patrick Halstead
    Project Manager at Qdabra
  • 08-31-2011 04:21 PM In reply to

    I understand how to filter on a key, to get a specific value when the return set contains everything you need, Ex.GetUserInfo

    [PreferredName] = John Smith, [Manager]=Mary Jones.....  In these cases you get back basically a hashTable that you can filter off the key to obtain the value of the field you need...  I am good here.

     My problem lies with the GetEmployeesForManager call.  I supply the required userID to the service and get back the same hashTable type object in which each record represents a direct report to the supplied userID.  In my case, I am pushing this return set directly into a dropDownList.  Right now, all I get is a list of userIDs.  The hashTable looks more like this:

    [smithJohn] = smithJohn, [jonesMary] = jonesMary.......

    The key and value are exactly the same in the return set from GetEmployeesForManager.  There is no extra keys to filter on that I see or have found.

    What I would like to do is be able to set my dropDownList accordingly:

    value = smithJohn, display= John R Smith

    Is there a way that the AD fields that are mapped to the Key/Value on the server side to the service can be modified to return a set that mimics:

    [smithJohn] = John R Smith, [jonesMary] = Mary H Jones

    There may be a way to do this on the client side where I loop through each record returned in GetEmployeesForManager, do a call to GetUserInfo, and pull it back that way, but the overhead on that method is unacceptable.

    Thanks for any help you can provide

  • 08-31-2011 06:17 PM In reply to

    The return from GetEmployeesForManager should return data in the following format: 

    <DropdownList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" table="pathal" xmlns="http://qdabra.com/webservices/">
      <entry value="bjones" display="Bob Jones" />
      <entry value="jsmith" display="Jim Smith" />
    </DropdownList>

    I suggest first checking your data binding.  If that is correct, then verify the returned data.  You can use the Fiddler tool http://fiddler2.com to see the data being returned from the server.

     

     

     

  • 09-01-2011 08:09 AM In reply to

    Well, that makes more sense on what it should be returning.

    I utilized fiddler and saw that my service is definitely returning the wrong AD value in the display field.  Based on your previous email, it seems the bindings are incorrect, can this be resolved through the DBXL Admin Tool (sorry but I'm not an admin/ops person)?

    Thanks for your help.

  • 09-01-2011 10:04 AM In reply to

    The DBXL Admin Tool is used for configuring the other web methods in the service. For AD, we should first verify that your Active Directory itself has the correct values. Then, we should look at the possibility that your ADWS (circa October 2010) has an unknown bug that was fixed in a more recent version (December 2010 release). Do you have access to an admin/ops person who installed ADWS? You'll need that person for both of the verifications above.

    Patrick Halstead
    Project Manager at Qdabra
  • 09-01-2011 10:12 AM In reply to

    OK,

     I have done some digging and am working with an admin.

    It appears that the CN (Full Name) is what is being returned in the value field for GetEmployeesForManager

    It also appears that the CN value on our AD server is the userID, not a Full Name or Display name.

    Is there a way to manipulate the web.config to reference another ad field to return the display name.

    I see an area that looks like this:

    <membershipProvider>

         <profileMappings>

              <profileMapping adEntry="cn" profileEntry="commonName" />

              <profileMapping adEntry="displayName" profileEntry="commonName" />

         </profileMappings>

    </membershipProvider>

     

    we have tried to set the <add key="useAlternativeUserInfo" value = "true">

    but when we set it to true, we get a 500 Error on the service. 

    - Should we be able to set the useAlternativeUserInfo = True and mod the profileMappings to pull a different AD field?

    Is there anywhere else that we should be trying to make changes?

    Thanks,

  • 09-02-2011 03:31 AM In reply to

    Just a quick update to this thread: we have fixed this in the AD Standalone tool and will be fixing it in DBXL. Thanks for reporting this!

    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


Page 1 of 1 (8 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.