Webservice - InfoPath Dev
in

InfoPath Dev

Webservice

Last post 04-19-2007 01:39 PM by Christopher Sorel. 9 replies.
Page 1 of 1 (10 items)
Sort Posts: Previous Next
  • 02-14-2007 08:14 AM

    Webservice

    I like the webservice, real easy to set up and use. The only problem I am having is I can get the manager info but I get the Cn, ou and everything else. Is there a way to pull just the CN portion of the manager information.
    What I am getting?
    (Example:manager CN=testgp,OU=IT Department,DC=crmc,DC=com)

    What I need?
    (Example: testgp)

    Any help would be appreciated.

    Thanks
  • 02-14-2007 12:59 PM In reply to

    Which webservice are you referring to?

    I'm assuming you have key/value pairs. If so, then you get the webservice/returnvalue/value[../key = 'CN'] --or equivelent-- webservice/returnvalue[key = 'CN']/value
  • 02-15-2007 08:31 AM In reply to

    QDABRA AD web service.
  • 02-15-2007 11:06 AM In reply to

    I've moved this discussion to the Qdabra AD WebService forum...

    Yes, you should be able to filter using the key/value pairs, as described before, to get the value you want. I don't have the exact xpath for you, but you should be able to decipher what I wrote earlier to understand how to get the value you want. If you have further specific questions, please ask.
  • 02-15-2007 12:11 PM In reply to

    I will keep trying, but so far I get the distinguished name info and when I try to filter out even further to just get the CN= portion of the distinguished name I am getting nothing at all. If you can get the xpath that would do this I would appreciate it, but I am not going to give up trying to work it out.

    Thanks
    David Quick
  • 02-15-2007 03:31 PM In reply to

    The distinguishedName key provides a concatenation of comma seperated values. You can use string-before(string-after(<field>, "CN="), ",") to pull out the particular value you are looking for.

    However, if you place a repeating table on your view bound to the repeating ADProp group from the web service, it will show you all the key value pairs. Most likely one of the other keys will give you the value you are looking for.

    For example, perhaps you can use the following keys to get the same data:

    "cn", "displayName", or "name"

    In my test, each of those keys give me the same data as is contained in the distinguishedName under CN=xyz. Results may vary based on your actual Active Directory data.

    Hope this helps.
  • 02-15-2007 03:32 PM In reply to

    Oh, I should mention that the reason the key "CN" didn't work from my example above was because it is actually a lowercase key "cn".
  • 02-15-2007 03:34 PM In reply to

    Sorry if I misunderstood your original question -- now that I'm looking back on it. You can certainly use the string-before/string-after functions to get what you need... but first take a look and see if your data is more readily available from another key, without needing to go through all the trouble.

    Good luck and let me know how it works out!
  • 02-16-2007 12:08 PM In reply to

    Thanks I will definitely give it a try.
  • 04-19-2007 01:39 PM In reply to

    I had same issue and this is how I solved it.

    1) Created a text field called managerGet

    default value is

    Value[Key = "manager"]

     Note Value is the Value in ADProp

    2) Created second text field that will be displayed on form called singleName

    default value is

    substring-after(substring-before(managerGet, ","), "CN=")

    Now I am trying to figure out how to take that and get the managers email address.  Anyone have an idea?  I went through the setup reference about adding GetUserInfo, repeating table and button.  But I want it to populate a field to use when submitting.

     

    Chris

     

    Christopher Sorel
    IT Manager
    [email protected]
Page 1 of 1 (10 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.